Is it very easy to return a pdf file from server in Asp.net MVC:
// controller(Basket) code =
public ActionResult GetTradingCondition()
{
HttpContext.Response.AddHeader("content-disposition", " inline; filename=" + "TradingCondition.pdf");
return File(Server.MapPath("~/Content/Files/TradingCondition.pdf"), "application/pdf","TradingCondition.pdf");
}
// view code
<% =Html.ActionLink("Trading_conditions", "GetTradingCondition", "Basket",new{@target="_blank"})%>
=========================================
Saturday, January 15, 2011
Thursday, January 13, 2011
numeric input validation
Most of the times we need to validate the input box. Using the following java script we can take only numeric value as an input
$(document).ready(function () {
$(".number").live("keyup", function () {
this.value = this.value.replace(/[^0-9\.]/g, '');
});})
we can use the script following ways:
<input ="" class="number" type="text" />
$(document).ready(function () {
$(".number").live("keyup", function () {
this.value = this.value.replace(/[^0-9\.]/g, '');
});})
we can use the script following ways:
<input ="" class="number" type="text" />
Tuesday, December 28, 2010
Tuesday, October 26, 2010
Snagit Screen Capture Software
“Snagit is the most useful tool you will find to combine pictures, words, and other objects into a meaningful illustration…”
Monday, October 25, 2010
Sandcastle (software)
Sandcastle is a documentation generator from Microsoft that automatically produces MSDN style reference documentation out of reflection information of .NET assemblies and XML documentation comments found in the source code of these assemblies. It can also be used to produce compiled user documentation from Microsoft Assistance Markup Language (MAML) with the same look and feel as reference documentation.
Sandcastle Help File Builder
Sandcastle, created by Microsoft, is a tool used for creating MSDN-style documentation from .NET assemblies and their associated XML comments files. The current version is the May 2008 release. It is command line based and has no GUI front-end, project management features, or an automated build process like those that you can find in NDoc. The Sandcastle Help File Builder was created to fill in the gaps, provide the missing NDoc-like features that are used most often, and provide graphical and command line based tools to build a help file in an automated fashion.Thursday, August 19, 2010
How to replace selected textarea value using javascript
// code for IE var textarea = document.getElementById("textarea"); if (document.selection) { textarea.focus(); var sel = document.selection.createRange(); // alert the selected text in textarea alert(sel.text); // Finally replace the value of the selected text // with this new replacement one sel.text = '' + sel.text + ''; } // code for Mozilla var textarea = document.getElementById("textarea"); var len = textarea.value.length; var start = textarea.selectionStart; var end = textarea.selectionEnd; var sel = textarea.value.substring(start, end); // This is the selected text and alert it alert(sel); var replace = '' + sel + ''; // Here we are replacing the selected text with this one textarea.value = textarea.value.substring(0,start) + replace + textarea.value.substring(end,len);
Sunday, August 1, 2010
Repository Has Not Been Enabled To Accept Revision Propchanges
Solution
To correct this, I needed to create a file in the "hooks" folder of my Subversion repository. On my system, it was located at C:\svn\repository\hooks. I created a file called "pre-revprop-change.bat", and I set the contents to this:
rem Only allow log messages to be changed.
if "%4" == "svn:log" exit 0
echo Property '%4' cannot be changed >&2
exit 1
This solution was suggested in the TortoiseSVN documentation.
Subscribe to:
Posts (Atom)
5 Strategies for Getting More Work Done in Less Time
Summary. You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...
-
Sometimes just to get a quick success build you might need to disable/ignore/skip some of the munit test cases. you can do you by double ...
-
Summary. You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...
-
“Snagit is the most useful tool you will find to combine pictures, words, and other objects into a meaningful illustration…”
