<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">DotNetJalps</title><subtitle type="html">Exploring technologies through innovations!!</subtitle><id>http://weblogs.asp.net/jalpeshpvadgama/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/jalpeshpvadgama/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2011-10-09T14:52:23Z</updated><entry><title>Number- New HTML5 Input type</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/number-new-html5-input-type.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/number-new-html5-input-type.aspx</id><published>2012-02-04T18:26:52Z</published><updated>2012-02-04T18:26:52Z</updated><content type="html">&lt;p&gt;I have been writing few series of new HTML5 input types and this is another post on same series. In this post I am going to explain Number input types. The number type is for numeric values. When you use number input type it will have spinner with up and down arrow and with the help of this you can increase or decrease of value.&lt;/p&gt;  &lt;h3&gt;Attributes of Number Input type:&lt;/h3&gt;  &lt;p&gt;There are four attributes of Number input types.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Value : &lt;/strong&gt;This attribute is used to specify the default value of the input type once its first loaded. So what ever you put there in input value it will be there. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Min: &lt;/strong&gt;As name suggest it defines minimum value for a range that you can you can choose in number input types. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Max: &lt;/strong&gt;It defines maximum number value for the range a number input type can have. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Step: &lt;/strong&gt;This attribute defines the number which will decrease or increase number value. If you don’t specify the value for it the default value for this will be 1. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;So now we know all attributes for number input types it is time for writing some code now. I am going to use same code for that I was using for that. Following is a code for that.&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;@{
   ViewBag.Title = &amp;quot;Home Page&amp;quot;;
}

&amp;lt;h2&amp;gt;@ViewBag.Message&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;
   To learn more about ASP.NET MVC visit &amp;lt;a href=&amp;quot;http://asp.net/mvc&amp;quot; title=&amp;quot;ASP.NET MVC Website&amp;quot;&amp;gt;http://asp.net/mvc&amp;lt;/a&amp;gt;.
&amp;lt;/p&amp;gt;
&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;  
   &amp;lt;label for=&amp;quot;numberInput&amp;quot;&amp;gt;Select Number:&amp;lt;/label&amp;gt;
   &amp;lt;input id=&amp;quot;numberInput&amp;quot; name=&amp;quot;numberInput&amp;quot; type=&amp;quot;number&amp;quot; min=&amp;quot;1&amp;quot; max=&amp;quot;10&amp;quot;/&amp;gt;
&amp;lt;/form&amp;gt; &lt;/pre&gt;

&lt;p&gt;Here in the above code you can see I have specified min value is 1 and max value is 10.&amp;#160; So it can have any values between 1 to 10. So let’s run that code in browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/image_0EBAEB35.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Html5, Input Type, Number " border="0" alt="Html5, Input Type, Number " src="http://weblogs.asp.net/blogs/jalpeshpvadgama/image_thumb_62020B8E.png" width="504" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see it is displaying output as expected. Please note that number input type are supported in following browsers.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Safari 5 or higher &lt;/li&gt;

  &lt;li&gt;Chrome 8 or higher &lt;/li&gt;

  &lt;li&gt;Opera 11 &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For other browsers that are not supporting number input type it will work as normal input type. That’s it. Hope you like it. Stay tuned for more.. Till than happy programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f02%2f04%2fnumber-new-html5-input-type.aspx&amp;amp;title=Number-+New+HTML5+Input+type"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/number-new-html5-input-type.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8281600" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET MVC" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+MVC/default.aspx" /><category term="HTML5" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML5/default.aspx" /><category term="Number Input type" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/Number+Input+type/default.aspx" /></entry><entry><title>URL–New HTML5 input element</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/url-new-html5-input-element.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/url-new-html5-input-element.aspx</id><published>2012-02-04T07:51:06Z</published><updated>2012-02-04T07:51:06Z</updated><content type="html">&lt;p&gt;In earlier &lt;a title="HTML5, Email, New Input" href="http://www.dotnetjalps.com/2012/01/email-new-html5-input-element.html" rel="HTML5, Email, New Input" target="_blank"&gt;post&lt;/a&gt; we have seen how the email input tag work in the browser. HTML5 comes with lots of new goodies and today we are going to see one of another new html5 input types URL. &lt;/p&gt;  &lt;p&gt;In most of the sites once you fill your contact and personal information it will ask for your URL. Till now there is no specific type for URL and we have to manually validate the URL with the Java Script but now with the HTML5 you don’t have do that. It will automatically validate the URL. For the browsers that are not supporting this will work as normal input text box.&lt;/p&gt;  &lt;p&gt;So let’s take a simple example of URL input type. I am going to use same ASP.NET MVC project that I have used for the earlier post. So Here is the code for that.&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;@{
    ViewBag.Title = &amp;quot;Home Page&amp;quot;;
}

&amp;lt;h2&amp;gt;@ViewBag.Message&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;
    To learn more about ASP.NET MVC visit &amp;lt;a href=&amp;quot;http://asp.net/mvc&amp;quot; title=&amp;quot;ASP.NET MVC Website&amp;quot;&amp;gt;http://asp.net/mvc&amp;lt;/a&amp;gt;.
&amp;lt;/p&amp;gt;
&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;  
    
    &amp;lt;label for=&amp;quot;urlInput&amp;quot;&amp;gt;URL:&amp;lt;/label&amp;gt;
    &amp;lt;input id=&amp;quot;urlInput&amp;quot; name=&amp;quot;urlInput&amp;quot; type=&amp;quot;url&amp;quot;/&amp;gt;
  
    &amp;lt;button type=&amp;quot;submit&amp;quot;&amp;gt; Check Input URL&amp;lt;/button&amp;gt;  
 &amp;lt;/form&amp;gt; &lt;/pre&gt;

&lt;p&gt;Now let's run that in browser. So once you enter some wrong Url and then click on submit button it will give error message like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/URLInputType_4F90DD8B.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="URL,HTML5, Input type" border="0" alt="URL,HTML5, Input type" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/URLInputType_thumb_4939E130.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it. You can see its very easy and I don’t have to write code for the URL validation. It will do that validation automatically. Hope you liked it. Stay tuned for more..till than Happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f02%2f04%2furl-new-html5-input-element.aspx&amp;amp;title=URL%e2%80%93New+HTML5+input+element"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/02/04/url-new-html5-input-element.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8280617" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET MVC" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+MVC/default.aspx" /><category term="HTML5" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML5/default.aspx" /><category term="HTML" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML/default.aspx" /><category term="URL Input type" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/URL+Input+type/default.aspx" /></entry><entry><title>Email-New Html5 input element</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/email-new-html5-input-element.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/email-new-html5-input-element.aspx</id><published>2012-01-29T07:46:49Z</published><updated>2012-01-29T07:46:49Z</updated><content type="html">&lt;p&gt;In most of the websites we have contact forms and other forms where we have some standard inputs like Phone,Email and Website URL and those are widely used in any site and has specific features. Email is one of the most standard used input elements which are used in our forms. Till HTML 4.1 we have standard input type text and that’s for we were doing input validation with java script and other technologies. While we all know HTML5 is there and it’s contains lots of goodies, One of them is email input types. &lt;/p&gt;  &lt;p&gt;Email input type comes with HTML5 as standard input type. It has all validation by default which are required for email input like we must have @ and . while we entered email input type. &lt;/p&gt;  &lt;p&gt;Let’s check email input type in details. Let’s create a ASP.NET MVC3 project with HTML5 Markup like following. To do that I have created a new Project called via File-&amp;gt;New Project-&amp;gt; ASP.NET MVC 3 web application like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/HTML5_4AF8D911.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="HTML5, Email,Input Element" border="0" alt="HTML5, Email,Input Element" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/HTML5_thumb_3F336C12.png" width="504" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you click ok following dialog box will come. Where you can select HTML5 markup as default.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/HTML5Markup_485F8186.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="HTML5Markup" border="0" alt="HTML5Markup" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/HTML5Markup_thumb_4F4F0E3E.png" width="504" height="454" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here I have selected HTML “Use hTML5 semantic markup”. So It will create a new project with HTML5 semantic markup. Now our Basic ASP.NET MVC application is ready so let’s write some code to check how Email input works. So I have written following code to check how its works in Index view of ASP.NET MVC application.&lt;/p&gt;  &lt;p&gt;Following is a code for that.&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;@{
   ViewBag.Title = &amp;quot;Home Page&amp;quot;;
}

&amp;lt;h2&amp;gt;@ViewBag.Message&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;
   To learn more about ASP.NET MVC visit &amp;lt;a href=&amp;quot;http://asp.net/mvc&amp;quot; title=&amp;quot;ASP.NET MVC Website&amp;quot;&amp;gt;http://asp.net/mvc&amp;lt;/a&amp;gt;.
&amp;lt;/p&amp;gt;
&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;  
       &amp;lt;label for=&amp;quot;emailInput&amp;quot;&amp;gt;Email:&amp;lt;/label&amp;gt;  
       &amp;lt;input id=&amp;quot;emailInput&amp;quot; name=&amp;quot;emailInput&amp;quot; type=&amp;quot;email&amp;quot; /&amp;gt;  
 
       &amp;lt;button type=&amp;quot;submit&amp;quot;&amp;gt; Check Input email&amp;lt;/button&amp;gt;  
&amp;lt;/form&amp;gt; &lt;/pre&gt;

&lt;p&gt;Now let’s run that in browser. It will look like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/EmailInputType_0ADEF732.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Email, Input Type, Validation,HTML5" border="0" alt="Email, Input Type, Validation,HTML5" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/EmailInputType_thumb_6BF85D86.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I am trying to input wrong email address and when I press submit button. It will show validation like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Email-Input-Type_7590A5EF.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Email Input Type" border="0" alt="Email Input Type" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Email-Input-Type_thumb_47FF605F.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So it’s showing validation that please input valid email address. Here I have not written any code for validation. So It’s a by default browser functionality. For the browsers which don’t understand email input type it will work as same old input type. That’s it. It's very easy and with the help of HTML5 we can do lots of other stuff. I am going to explain them in future posts. Hope you like it. Stay tuned for more..Happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f29%2femail-new-html5-input-element.aspx&amp;amp;title=Email-New+Html5+input+element"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/email-new-html5-input-element.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8271168" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="HTML5" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML5/default.aspx" /><category term="HTML" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML/default.aspx" /><category term="EmailType" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/EmailType/default.aspx" /></entry><entry><title>My first video for code refactoring in visual studio 2010</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/my-first-video-for-code-refactoring-in-visual-studio-2010.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/my-first-video-for-code-refactoring-in-visual-studio-2010.aspx</id><published>2012-01-28T21:04:43Z</published><updated>2012-01-28T21:04:43Z</updated><content type="html">&lt;p&gt;I have been planning this since long but now Its happened. I have created a video for visual studio 2010 code refactoring features. I have made this video public. Following is a link for that.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share"&gt;http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here is the video..&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:3b089b24-9cf1-45e3-99b9-0da13937edfe" class="wlWriterSmartContent"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=HvC63rE7tB4&amp;amp;feature=share" target="_new"&gt;&lt;img src="http://weblogs.asp.net/blogs/jalpeshpvadgama/videocfc55ea0eff6_4161DD33.jpg" style="border-style: none" galleryimg="no" alt=""&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;Please see the video and let me know your feedback. I am not a trained professional in this but I have tried to create it. Hope fully I will master this technique in some time. Stay tuned for more. Till then Happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f29%2fmy-first-video-for-code-refactoring-in-visual-studio-2010.aspx&amp;amp;title=My+first+video+for+code+refactoring+in+visual+studio+2010"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/29/my-first-video-for-code-refactoring-in-visual-studio-2010.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8270824" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="VisualStudio2010" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/VisualStudio2010/default.aspx" /><category term="Refractor" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/Refractor/default.aspx" /></entry><entry><title>string.format escape sequence in c#</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/08/string-format-escape-sequence-in-c.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/08/string-format-escape-sequence-in-c.aspx</id><published>2012-01-08T11:28:38Z</published><updated>2012-01-08T11:28:38Z</updated><content type="html">&lt;p&gt;Recently I was working on something and I need to put a curly bracket on the string with a string.format function but I was not aware how to to do it. So I did some search on internet and found how to give escape sequence in string.format. Suppose You need to put curly bracket then you have write two ‘{{‘ instead of { to put ‘{‘ and same way ‘}}’ to put ‘}’&lt;/p&gt; &lt;p&gt;Let’s take simple example. Following is a code where I am printing simple string with string.format and Response.Write. &lt;/p&gt;&lt;pre class="brush: csharp; first-line: 8;"&gt;using System;
using System.Web.UI;

namespace CallBack
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write( string.Format(@"{{ escape sequence for string format from {0}}}", "DotNetJalps"));
        }

    }
}&lt;/pre&gt;&lt;font face="Arial"&gt;Now let’s run that example in browser and let’s see how it goes.&lt;/font&gt;&lt;font face="Arial"&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/EscapeSequenceForString.format_7510E91D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="C#,Escape Sequence,String.format" border="0" alt="C#,Escape Sequence,String.format" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/EscapeSequenceForString.format_thumb_617363AF.png" width="504" height="285"&gt;&lt;/a&gt;&lt;/font&gt; 
&lt;p&gt;That’s it. It’s very easy to use.Hope you liked it. Stay tuned for more..Happy Programming.&lt;/p&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f08%2fstring-format-escape-sequence-in-c.aspx&amp;amp;title=string.format+escape+sequence+in+c%23"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/08/string-format-escape-sequence-in-c.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8233973" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="C#.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_23002E00_NET/default.aspx" /><category term="C#" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Difference between generic handler and http handler- ASP.NET</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/difference-between-generic-handler-and-http-handler-asp-net.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/difference-between-generic-handler-and-http-handler-asp-net.aspx</id><published>2012-01-07T11:37:56Z</published><updated>2012-01-07T11:37:56Z</updated><content type="html">&lt;h4&gt;Generic handler:&lt;/h4&gt;  &lt;p&gt;As per MSDN Generic Handler is a default handler which will have @webhandler directive and has .ashx extension this generic handler is not having UI but it provides response when ever any request made to this handler.&lt;/p&gt;  &lt;h4&gt;HTTP Handler:&lt;/h4&gt;  &lt;p&gt;HTTP Handler is a process which runs and continue to server request and give response based on the request handling code. This handler does not have UI and need to configured in the web.config against extensions. One of the great example of Http Handler is page handler of ASP.NET which serves .aspx pages request.&lt;/p&gt;  &lt;h4&gt;Difference between generic handler and http handler:&lt;/h4&gt;  &lt;p&gt;Following is a main differences between http handler and generic handler.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Generic handler has a handler which can be accessed by url with .ashx extension while http handler is&amp;#160; required to be configured in web.config against extension in web.config.It does not have any extension &lt;/li&gt;    &lt;li&gt;Typical example of generic handler are creating thumbnails of images and for http handler page handler which serves .aspx extension request and give response. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Hope you liked it.Stay tuned for more..Till then happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f07%2fdifference-between-generic-handler-and-http-handler-asp-net.aspx&amp;amp;title=Difference+between+generic+handler+and+http+handler-+ASP.NET"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/difference-between-generic-handler-and-http-handler-asp-net.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8230964" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="HttpHandler" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HttpHandler/default.aspx" /><category term="Generic Handler" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/Generic+Handler/default.aspx" /></entry><entry><title>how to vertically middle align text in div-HTML tip</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/how-to-vertically-middle-align-text-in-div-html-tip.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/how-to-vertically-middle-align-text-in-div-html-tip.aspx</id><published>2012-01-07T10:47:24Z</published><updated>2012-01-07T10:47:24Z</updated><content type="html">&lt;p&gt;Recently in one of the project I have to vertical align text in div. so doing some internet search I have found there are no proper way to do it. So I thought it would be good do share this within my readers.&lt;/p&gt;  &lt;p&gt;Here is the code do vertically align text in div.&lt;/p&gt;  &lt;pre class="brush: xml; first-line: 8;"&gt;&amp;lt;div style=&amp;quot;width: 25%;border:solid 1px red;display: table;vertical-align: middle;float:left;height:100px;&amp;quot;&amp;gt;
   &amp;lt;div style=&amp;quot;display: table-cell;vertical-align: middle;&amp;quot;&amp;gt;this is a very long text this is a very long text this is a very long text this is a very long text this is a very long text this is a very long text &amp;lt;/div&amp;gt; 
&amp;lt;/div&amp;gt;&lt;/pre&gt;

&lt;p&gt;Here in above code you can see that I have created two divs first one will serve container for other div and other div has the text which I want to align vertically in div. So in container div you can see I have given its style to display table and in child div which has the text I have given its display style to table-cell and also I have set vertical-align set to middle.&lt;/p&gt;

&lt;p&gt;That’s it now when you run this in browser you can see text is vertically aligned.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/DivVerticallyAligned_28D9AA82.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="HTML Tip,Div,Vertical Align" border="0" alt="HTML Tip,Div,Vertical Align" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/DivVerticallyAligned_thumb_2D40057C.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you liked it..Stay tuned for more..Till then happy programming.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f07%2fhow-to-vertically-middle-align-text-in-div-html-tip.aspx&amp;amp;title=how+to+vertically+middle+align+text+in+div-HTML+tip"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/how-to-vertically-middle-align-text-in-div-html-tip.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8230831" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="HTML" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/HTML/default.aspx" /></entry><entry><title>ASP.NET Page Methods with Parameters</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/asp-net-page-methods-with-parameters.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/asp-net-page-methods-with-parameters.aspx</id><published>2012-01-07T10:01:36Z</published><updated>2012-01-07T10:01:36Z</updated><content type="html">&lt;p&gt;In earlier &lt;a title="ASP.NET,C#.NET,Java Script, Page Methods" href="http://www.dotnetjalps.com/2011/12/page-methods-in-aspnet.html" rel="ASP.NET,C#.NET,Java Script, Page Methods" target="_blank"&gt;post&lt;/a&gt; I have written how we can use page methods to call server-side from the java script. In this post I am going to explain How we can pass parameters to page methods with java script.&lt;/p&gt;  &lt;p&gt;So let’s take a simple example to see how we can pass parameters to the page methods. I am going to create a page method Hello World which takes name as parameter and return a string to greet user from that page method below is code for that.&lt;/p&gt;  &lt;pre class="brush: csharp; first-line: 8;"&gt;using System;
using System.Web.Services;

namespace PageMethods
{
    public partial class Test : System.Web.UI.Page
    {
       [WebMethod]
       public static string HelloWorld(string name)
       {
           return string.Format(&amp;quot;Hi {0}&amp;quot;,name);
       }
    }
}&lt;/pre&gt;

&lt;p&gt;As you can see in following page method it’s returning string with greetings. So now our server-side code is completed. Now it’s time to write HTML and java script code for this. Following is code for java script.&lt;/p&gt;

&lt;pre class="brush: js; first-line: 8;"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    function GreetingsFromServer() {
        var name = 'Jalpesh';
        PageMethods.HelloWorld(name,OnSuccess, OnError);
        return false;
    }
    function OnSuccess(response) {
        alert(response);
    }
    function OnError(error) {
        alert(error);
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code I have created a function called ‘GreetingsFromServer’ which called page method helloworld with passing name parameter. Other two functions are handlers for the page methods Onsucess will be called if page method is called successfully without error other wise it will call onError method and alert error message.&lt;/p&gt;

&lt;p&gt;Now we are done with java script so its time to write HTML code. So let’s write a HTML code for this page.&lt;/p&gt;

&lt;pre class="brush: js; first-line: 8;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Test.aspx.cs&amp;quot; Inherits=&amp;quot;PageMethods.Test&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;Page Method with parameter demo&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;asp:ScriptManager runat=&amp;quot;server&amp;quot; EnablePageMethods=&amp;quot;true&amp;quot; EnablePartialRendering=&amp;quot;true&amp;quot;&amp;gt;
        &amp;lt;/asp:ScriptManager&amp;gt;

        &amp;lt;asp:button ID=&amp;quot;btnHelloWorld&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Greet User&amp;quot; OnClientClick=&amp;quot;return GreetingsFromServer();&amp;quot;/&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see from above code I have enabled page methods true with script manager&amp;#160; and then&amp;#160; I have called JavaScript function “GreetingsFromServer” on button client click. So it’s now time to run this code in browser. Following is output as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/PageMethodWithParameter_01F4C414.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PageMethodWithParameter" border="0" alt="PageMethodWithParameter" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/PageMethodWithParameter_thumb_40D61EE2.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it. It’s very easy hope you liked it..Stay tuned for more…Happy programming&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2012%2f01%2f07%2fasp-net-page-methods-with-parameters.aspx&amp;amp;title=ASP.NET+Page+Methods+with+Parameters"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2012/01/07/asp-net-page-methods-with-parameters.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8230738" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="C#" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_2300_/default.aspx" /><category term="PageMethods" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/PageMethods/default.aspx" /></entry><entry><title>Page methods in asp.net</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/24/page-methods-in-asp-net.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/24/page-methods-in-asp-net.aspx</id><published>2011-12-23T20:29:21Z</published><updated>2011-12-23T20:29:21Z</updated><content type="html">&lt;p&gt;Now days people are looking for richer and fluid user experience and to create that kind of application Ajax is required. There are several options available to call server-side function from JavaScript with ASP.NET Ajax and if you are using asp.net 2.0 or higher version of Microsoft.NET Framework then page methods are one of best options available to you.&lt;/p&gt;  &lt;p&gt;Page methods are available there from asp.net 2.0. If works just like a normal web service. You can direct call that page methods directly from the JavaScript. &lt;/p&gt;  &lt;p&gt;Let’s take a real world example. I will call java script on button client click event and then from that we call server-side function from the page methods. So let’s create a project called Pagemethods via File-&amp;gt;New Project like following&lt;/p&gt;  &lt;p&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/NewProjectPageMethodsinASP.NET_2375B169.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Page methods in ASP.NET" border="0" alt="Page methods in ASP.NET" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/NewProjectPageMethodsinASP.NET_thumb_10FD3AE7.png" width="504" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After that I have created a page called test.aspx and now I am creating page method called GetCurrentDate like following.&lt;/p&gt;  &lt;pre class="brush: csharp; first-line: 8;"&gt;using System;
using System.Web.Services;

namespace PageMethods
{
    public partial class Test : System.Web.UI.Page
    {
       [WebMethod]
       public static string GetCurrentDate()
       {
           return DateTime.Now.ToShortDateString();
       }
    }
}&lt;/pre&gt;

&lt;p&gt;As you can see in above there is&amp;#160; a web method called GetCurrentDate which is just returning short date in string format. Here you will notice that I have putted WebMehod attribute for that method this is a perquisite for page methods to make available in client side.&lt;/p&gt;

&lt;p&gt;Now let’s write code for HTML and JavaScript and following is a HTML code for that.&lt;/p&gt;

&lt;pre class="brush: xml; first-line: 8;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Test.aspx.cs&amp;quot; Inherits=&amp;quot;PageMethods.Test&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;Page Method demo&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;asp:ScriptManager runat=&amp;quot;server&amp;quot; EnablePageMethods=&amp;quot;true&amp;quot; EnablePartialRendering=&amp;quot;true&amp;quot;&amp;gt;
        &amp;lt;/asp:ScriptManager&amp;gt;

        &amp;lt;asp:button ID=&amp;quot;btnGetDate&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Get date from server&amp;quot; OnClientClick=&amp;quot;return GetDateFromServer();&amp;quot;/&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code I have taken an ASP.NET button which call client side function GetDateFromServer which call page methods and get server date. Following is a javascript code for that.&lt;/p&gt;

&lt;pre class="brush: js; first-line: 8;"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    function GetDateFromServer() {
        PageMethods.GetCurrentDate(OnSuccess, OnError);
        return false;
    }
    function OnSuccess(response) {
        alert(response);
    }
    function OnError(error) {
        alert(error);
    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in GetdateFromServer methods I have called our page method Get Current date and you can see PageMethods object in JavaScript has all the methods which are available from server-side. I have passed two event handler for success and error. If any error occurred then it will alert that error and on successful response from server it will alert a current date.&lt;/p&gt;

&lt;p&gt;So it’s now time to run that in browser.So once you pass F5 then once you click ‘Get date from server’ the output is like following as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/PageMethodOutput_41639990.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PageMethodOutput" border="0" alt="PageMethodOutput" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/PageMethodOutput_thumb_616E8080.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it as you see it’s very easy.Hope you like it. Stay tuned for more.Till then happy programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f12%2f24%2fpage-methods-in-asp-net.aspx&amp;amp;title=Page+methods+in+asp.net"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/24/page-methods-in-asp-net.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8160830" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="C#.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_23002E00_NET/default.aspx" /><category term="JavaScript" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/JavaScript/default.aspx" /></entry><entry><title>Async file upload with jquery and ASP.NET</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/23/async-file-upload-with-jquery-and-asp-net.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/23/async-file-upload-with-jquery-and-asp-net.aspx</id><published>2011-12-22T20:02:00Z</published><updated>2011-12-22T20:02:00Z</updated><content type="html">&lt;p&gt;Recently before some I was in search of good asynchronous file upload control which can upload file without post back and I have don’t have to write&amp;#160; much custom logic about this. So after searching it on internet I have found lots of options but some of the options were not working with ASP.NET and some of work options are not possible regarding context to my application just like &lt;a title="Async file upload with jquery and ASP.NET" href="http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AsyncFileUpload/AsyncFileUpload.aspx" rel="Async file upload with jquery and ASP.NET" target="_blank"&gt;AsyncFileUpload&lt;/a&gt; from Ajax toolkit.As in my application we were having old version of Ajax toolkit and if we change it than other controls stopped working. So after doing further search on internet I have found a great &lt;a title="Async file upload with jquery plug in and asp.net" href="http://www.phpletter.com/Our-Projects/AjaxFileUpload/" rel="Async file upload with jquery plug in and asp.net" target="_blank"&gt;Juqery&lt;/a&gt; plugin which can easily be integrated with my application and I don’t have to write much coding to do same.&lt;/p&gt;  &lt;p&gt;So I have download that plug from the following link. This plug in created by &lt;a href="mailto:oyvind.saltvik@gmail.com"&gt;yvind Saltvik&lt;/a&gt;,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.phpletter.com/Our-Projects/AjaxFileUpload/"&gt;http://www.phpletter.com/Our-Projects/AjaxFileUpload/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After downloading the plugin and going through it documentation I have found that I need to write a page or generic handler which can directly upload the file on the server. So I have decided to write a generic handler for that as generic handler is best suited with this kind of situation and we don’t have to bother about response generated by it. &lt;/p&gt;  &lt;p&gt;So let’s create example and In this example I will show how we can create async file upload without writing so much code with the help of this plugin. So I have create project called JuqeryFileUpload and our need for this example to create a generic handler. So let’s create a generic handler. You can create a new generic handler via right project-&amp;gt; Add –&amp;gt;New item-&amp;gt;Generic handler just like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/GenericHandlerForJqueryFileUploadwithASPNET_31000762.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="GenericHandlerForJqueryFileUploadwithASPNET" border="0" alt="GenericHandlerForJqueryFileUploadwithASPNET" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/GenericHandlerForJqueryFileUploadwithASPNET_thumb_76E114B5.png" width="504" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have created generic handler called AjaxFileuploader and following is simple code for that.&lt;/p&gt;  &lt;pre class="brush: csharp; first-line: 8;"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

namespace JuqeryFileUPload
{
    /// &amp;lt;summary&amp;gt;
    /// Summary description for AjaxFileUploader
    /// &amp;lt;/summary&amp;gt;
    public class AjaxFileUploader : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            if (context.Request.Files.Count &amp;gt; 0)
            {
                string path = context.Server.MapPath(&amp;quot;~/Temp&amp;quot;);
                if (!Directory.Exists(path))
                    Directory.CreateDirectory(path);

                var file = context.Request.Files[0];

                string fileName;

                if (HttpContext.Current.Request.Browser.Browser.ToUpper() == &amp;quot;IE&amp;quot;)
                {
                    string[] files = file.FileName.Split(new char[] { '\\' });
                    fileName = files[files.Length - 1];
                }
                else
                {
                    fileName = file.FileName;
                }
                string strFileName=fileName ;
                fileName = Path.Combine(path, fileName);
                file.SaveAs(fileName);

                
                string msg = &amp;quot;{&amp;quot;;
                msg += string.Format(&amp;quot;error:'{0}',\n&amp;quot;, string.Empty);
                msg += string.Format(&amp;quot;msg:'{0}'\n&amp;quot;, strFileName);
                msg += &amp;quot;}&amp;quot;;
                context.Response.Write(msg);  

                
            }
        }

        public bool IsReusable
        {
            get
            {
                return true;
            }
        }
    }
}&lt;/pre&gt;

&lt;p&gt;As you can see in above code.I have written a simple code to upload a file from received from file upload plugin into the temp directory on the server and if this directory is not there on the server then it will also get created by the this generic handler.At the end of the of execution I am returning the simple response which is required by plugin itself. Here in message part I am passing the name of file uploaded and in error message you can pass error if anything occurred for the time being I have not used right now.&lt;/p&gt;

&lt;p&gt;As like all jQuery plugin this plugin also does need jQuery file and there is another .js file given for plugin called ajaxfileupload.js. So I have created a test.aspx to test jQuery file and written following html for that .&lt;/p&gt;

&lt;pre class="brush: xml; first-line: 8;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Test.aspx.cs&amp;quot; Inherits=&amp;quot;JuqeryFileUPload.Test&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;jquery.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;ajaxfileupload.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
          &amp;lt;input id=&amp;quot;fileToUpload&amp;quot; type=&amp;quot;file&amp;quot; size=&amp;quot;45&amp;quot; name=&amp;quot;fileToUpload&amp;quot; class=&amp;quot;input&amp;quot;&amp;gt;
          &amp;lt;button id=&amp;quot;buttonUpload&amp;quot; onclick=&amp;quot;return ajaxFileUpload();&amp;quot;&amp;gt;Upload&amp;lt;/button&amp;gt;
          &amp;lt;img id=&amp;quot;loading&amp;quot; src=&amp;quot;loading.gif&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code there its very simple. I have included the jQuery and ajafileupload.js given by the file upload give and there are three elements that I have used one if plain file input control you can also use the asp.net file upload control and but here I don’t need it so I have user file upload control. There is button there called which is calling a JavaScript function called “ajaxFileUpload” and here we will write a code upload that. There is an image called loading which just an animated gif which will display during the async call of generic handler. Following is code ajaxFileUpload function.&lt;/p&gt;

&lt;pre class="brush: js; first-line: 8;"&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
    function ajaxFileUpload() {
        $(&amp;quot;#loading&amp;quot;)
    .ajaxStart(function () {
        $(this).show();
    })
    .ajaxComplete(function () {
        $(this).hide();
    });

    $.ajaxFileUpload
    (
        {
            url: 'AjaxFileUploader.ashx',
            secureuri: false,
            fileElementId: 'fileToUpload',
            dataType: 'json',
            data: { name: 'logan', id: 'id' },
            success: function (data, status) {
                if (typeof (data.error) != 'undefined') {
                    if (data.error != '') {
                        alert(data.error);
                    } else {
                        alert(data.msg);
                    }
                }
            },
            error: function (data, status, e) {
                alert(e);
            }
        }
    )

        return false;

    }
&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code I have putted our generic handler url which will upload the file on server as url parameter. There is also parameter called secureURI is required to be true if you are uploading file through the secure channel and as a third parameter we have to pass a file upload control id which I have already passed and in fourth parameter we have to passed busy indicator which I have also passed. Once we passed all the parameter then it will call a method for plugin and will return response in terms of message and error. So There is two handler function written for that.&lt;/p&gt;

&lt;p&gt;That’s it. Our async file upload is ready. As you can easily integrate it and also it working fine in all the browser. Hope you like it. Stay tuned for more. Till then happy programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f12%2f23%2fasync-file-upload-with-jquery-and-asp-net.aspx&amp;amp;title=Async+file+upload+with+jquery+and+ASP.NET"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/23/async-file-upload-with-jquery-and-asp-net.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8155661" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="JavaScript" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/JavaScript/default.aspx" /><category term="jQuery" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/jQuery/default.aspx" /></entry><entry><title>Redirection in URL Routing</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/22/redirection-in-url-routing.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/22/redirection-in-url-routing.aspx</id><published>2011-12-21T19:34:20Z</published><updated>2011-12-21T19:34:20Z</updated><content type="html">&lt;p&gt;In one of the my earlier &lt;a title="Url routing in ASP.NET-URL rewirting in ASP.NET 4.0" href="http://www.dotnetjalps.com/2011/12/easy-url-rewriting-in-aspnet-40-web.html" rel="Url routing in ASP.NET-URL rewirting in ASP.NET 4.0" target="_blank"&gt;post&lt;/a&gt; I have written How easily we do URL rewriting in ASP.NET Web forms. In this post I am going to explain redirection in URL Routing.&lt;/p&gt;  &lt;p&gt;In web application it’s a common scenario that we are redirecting our page to the one from the another and those who are familiar with the ASP.NET Web Forms will also know how we can use&amp;#160; &lt;strong&gt;Response.Redirect() &lt;/strong&gt;to redirect from one page to another page.&amp;#160; In ASP.NET 4.0 Web Forms they have given same kind of Method to redirect to a particular route. The method is &lt;strong&gt;Response.RedirectToRoute()&lt;/strong&gt;. With the help of this method you can redirect to any particular route. Response.RedirectToRoute() has different overload method you can find more information about it from following link.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd992853.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd992853.aspx&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h4&gt;Real Example of Response.RedirectToRoute &lt;/h4&gt;  &lt;p&gt;Iam going to use same example which I have used in my earlier &lt;a title="ASP.NET 4.0 URL Rewriting-ASP.NET 4.0 webforms URL routing" href="http://www.dotnetjalps.com/2011/12/easy-url-rewriting-in-aspnet-40-web.html" rel="ASP.NET 4.0 URL Rewriting-ASP.NET 4.0 webforms URL routing" target="_blank"&gt;post&lt;/a&gt;. We are going to add a new page called Index.aspx. After adding the page. I am going to add following code to global.asax to map index.aspx to launch by default.&lt;/p&gt;  &lt;pre class="brush: csharp; first-line: 8;"&gt;using System;
using System.Web.Routing;

namespace UrlRewriting
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes(RouteTable.Routes);
        }
        
        public static void RegisterRoutes(RouteCollection routeCollection)
        {
            routeCollection.MapPageRoute(&amp;quot;RouteForCustomer&amp;quot;, &amp;quot;Customer/{Id}&amp;quot;, &amp;quot;~/Customer.aspx&amp;quot;);
            routeCollection.MapPageRoute(&amp;quot;DefaultRoute&amp;quot;, string.Empty, &amp;quot;~/Index.aspx&amp;quot;);
        }

    }
}&lt;/pre&gt;

&lt;p&gt;As you can see in above I have added a default route to map index.aspx. Following is HTML code for index.aspx&lt;/p&gt;

&lt;pre class="brush: xml; first-line: 8;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;Index.aspx.cs&amp;quot; Inherits=&amp;quot;UrlRewriting.Index&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;This is my home page&amp;lt;/h1&amp;gt;
        &amp;lt;asp:button ID=&amp;quot;btnGoToCustomer&amp;quot; runat=&amp;quot;server&amp;quot;  Text=&amp;quot;Goto first Customer&amp;quot; 
            onclick=&amp;quot;btnGoToCustomer_Click&amp;quot;/&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

&lt;p&gt;As you can see in above code I have created a ASP.NET Button called for redirection and on click of that button I have written following code for that.&lt;/p&gt;

&lt;pre class="brush: csharp; first-line: 8;"&gt;protected void btnGoToCustomer_Click(object sender, EventArgs e)
{
    Response.RedirectToRoute(&amp;quot;RouteForCustomer&amp;quot;,new {Id=1});
}&lt;/pre&gt;

&lt;p&gt;As you can see in above code I have redirect it to ‘Customer' route and I am passing Id as “1” so it will load details of customer whose id is 1.&lt;/p&gt;

&lt;p&gt;Let’s run this example via pressing F5. So it will directly load index.aspx page as homepage like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/HomePageForURLRedirection_4BBE1319.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="HomePageForURLRedirection- ASP.NET 4.0 URL Routing and revwriting" border="0" alt="HomePageForURLRedirection- ASP.NET 4.0 URL Routing and revwriting" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/HomePageForURLRedirection_thumb_6B994A49.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now once you click on button It will redirect to custom page and will display customer information.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/CustomerDetailsPage_0BA4313A.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="CustomerDetailsPage" border="0" alt="CustomerDetailsPage" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/CustomerDetailsPage_thumb_623CC36E.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So that’s it. You can see it’s very easy redirect pages with URL routing. Hope you like it. Stay tuned for more.Till then Happy programming..&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f12%2f22%2fredirection-in-url-routing.aspx&amp;amp;title=Redirection+in+URL+Routing"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/22/redirection-in-url-routing.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8151799" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="ASP.NET 4.0" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+4.0/default.aspx" /><category term="URLRewriting" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/URLRewriting/default.aspx" /><category term="URLRouting" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/URLRouting/default.aspx" /></entry><entry><title>My blog post are appearing on MSDN ASP.NET MVC Content Map</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/my-blog-post-are-appearing-on-msdn-asp-net-mvc-content-map.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/my-blog-post-are-appearing-on-msdn-asp-net-mvc-content-map.aspx</id><published>2011-12-11T05:44:53Z</published><updated>2011-12-11T05:44:53Z</updated><content type="html">&lt;p&gt;Yesterday I was searching something and I got a nice surprise. I have seen my blog post for &lt;a title="Blog post appearing on MSDN Content- DotNetJalps" href="http://www.dotnetjalps.com/2011/08/creating-basic-rss-reader-in-aspnet-mvc.html" rel="Blog post appearing on MSDN Content- DotNetJalps" target="_blank"&gt;RSS reader&lt;/a&gt; is appearing on MSDN ASP.NET MVC content map. It is really proud movement for me. Following is the link from where you will get this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg416514%28v=VS.98%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg416514%28v=VS.98%29.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On this page Microsoft has created a list of best resources for ASP.NET MVC and one of my post are selected for this. Go to additional resources and there you can see my blog post about &lt;a title="DotNetJalps appearing on MSDN" href="http://www.dotnetjalps.com/2011/08/creating-basic-rss-reader-in-aspnet-mvc.html" rel="DotNetJalps appearing on MSDN" target="_blank"&gt;RSS reader&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/MSDN_59AEC656.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="MSDN" border="0" alt="MSDN" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/MSDN_thumb_01451CB4.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I would like to take this opportunity to thank my readers. It’s all because of them. I promise that I will keep same kind of work again. I would also like to thank MSDN people for adding my blog post to their list. Thank you very very much MSDN Content creators.&lt;/p&gt;  &lt;p&gt;Hope you like it. Stay tuned for more…Till then Happy programing…&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f12%2f11%2fmy-blog-post-are-appearing-on-msdn-asp-net-mvc-content-map.aspx&amp;amp;title=My+blog+post+are+appearing+on+MSDN+ASP.NET+MVC+Content+Map"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/my-blog-post-are-appearing-on-msdn-asp-net-mvc-content-map.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8108686" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="ASP.NET MVC" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+MVC/default.aspx" /><category term="MVP" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/MVP/default.aspx" /><category term="MSDN" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/MSDN/default.aspx" /><category term="ASP.NET 4.0" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+4.0/default.aspx" /></entry><entry><title>Easy URL routing  in ASP.NET 4.0 web forms</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/easy-url-rewriting-in-asp-net-4-0-web-forms.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/easy-url-rewriting-in-asp-net-4-0-web-forms.aspx</id><published>2011-12-10T19:59:17Z</published><updated>2011-12-10T19:59:17Z</updated><content type="html">&lt;p&gt;In this post I am going to explain URL routing in greater details. This post will contain basic of URL routing and will explain how we can do URL routing in fewer lines of code.&lt;/p&gt;  &lt;h4&gt;Why we need URL routing?&lt;/h4&gt;  &lt;p&gt;Let’s consider a simpler scenario we want to display a customer details on a ASP.NET Page so how our page will know that for which customer we need to display details? The simplest way of doing is to use query string we will pass a customer id which uniquely identifies customer in&amp;#160; query string. So our url will look like this.&lt;/p&gt;  &lt;h5&gt;Customer.aspx?Id=1&lt;/h5&gt;  &lt;p&gt;This will work but the problem with above URL is that its not user friendly and search engine friendly. who is going to remember that what query string parameter I am going to pass and why we need that parameter. Also when search engine will crawl this site it will going to read this URL blindly as this url is not informative because it query string is not readable for search engine crawlers. So your search engine will be ranked lower as this URL is not readable to search engine crawlers.&lt;/p&gt;  &lt;p&gt;Now when do a URL routing our URL will be cleaner shorter and simpler like this.&lt;/p&gt;  &lt;h5&gt;Customers/Id/1/&lt;/h5&gt;  &lt;p&gt;Here anybody in world can understand it talking about customer and this page will used to show customer details.Even search engine crawler will also know that you are talking about customers. That is why we need URL routing. &lt;/p&gt;  &lt;h5&gt;&lt;/h5&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;URL routing and ASP.NET &lt;/h4&gt;  &lt;p&gt;In earlier versions of ASP.NET we have to write lots of code for URL routing but Now with ASP.NET 4.0 you can easily route in fewer lines of code.&lt;/p&gt;  &lt;p&gt;So let’s start a Demo where I will demonstrate you how we can easily route URLs. So let’s first create a ASP. NET web form application via File-&amp;gt;New-&amp;gt;Project and a dialog box will open just like below and then created a empty project called URL rewriting.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/AddNewProject_0D891ADC.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Add new project for URL rewriting in asp.net 4.0" border="0" alt="Add new project for URL rewriting in asp.net 4.0" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/AddNewProject_thumb_0F29C0E3.png" width="504" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After creating a project I have added global.asax – where we are going to write url mapping logic and then I have added an asp.net page called which will display customer information just like below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorer_113699DF.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Project for URL rewriting in asp.net 4.0" border="0" alt="Project for URL rewriting in asp.net 4.0" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorer_thumb_746CFEFC.png" width="504" height="419" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So everything is now ready let’s start writing code. First thing we need to do is to define routes. Route will map a URL to physical page.First I will create static function called Register route which map route to particular file and then I am going to call this from application_start event of global.asax. Following is code for that.&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;using System;
using System.Web.Routing;

namespace UrlRewriting
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes(RouteTable.Routes);
        }
        
        public static void RegisterRoutes(RouteCollection routeCollection)
        {
            routeCollection.MapPageRoute(&amp;quot;RouteForCustomer&amp;quot;, &amp;quot;Customer/{Id}&amp;quot;, &amp;quot;~/Customer.aspx&amp;quot;);
        }

    }
}&lt;/pre&gt;

&lt;p&gt;Now as mapping code has been done let’s right code for customer.aspx page. I have have following code in page_load event of customer.aspx&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;using System;

namespace UrlRewriting
{
    public partial class Customer : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Page.RouteData.Values[&amp;quot;Id&amp;quot;].ToString();

            Response.Write(&amp;quot;&amp;lt;h1&amp;gt;Customer Details page&amp;lt;/h1&amp;gt;&amp;quot;);
            Response.Write(string.Format(&amp;quot;Displaying information for customer : {0}&amp;quot;,id));

        }
    }
}&lt;/pre&gt;

&lt;p&gt;Here in above code you can see that I am getting value from page route data and then just printing it. In real world it will fetch customer data from database and show customer details on page.&lt;/p&gt;

&lt;p&gt;Now let’s run that application. It will print a details of customer as I have passed Id in URL suppose you pass 1 as id in URL then it will look like following.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Customer1_6F5A9B80.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Customer details via URL rewriting in asp.net 4.0" border="0" alt="Customer details via URL rewriting in asp.net 4.0" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Customer1_thumb_07DA1304.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if you put 2 in url it will print information about customer 2.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Customer2_0FC18F99.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Customer two details via URL rewriting in asp.net 4.0" border="0" alt="Customer two details via URL rewriting in asp.net 4.0" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Customer2_thumb_5A38A7A6.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it. So we have enabled URL routing in asp.net in fewer lines of code. In next post I am going to explain redirection with URL routing. &lt;/p&gt;

&lt;p&gt;Hope you like this post. Stay tuned for more.. Till then Happy programming&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f12%2f11%2feasy-url-rewriting-in-asp-net-4-0-web-forms.aspx&amp;amp;title=Easy+URL+routing++in+ASP.NET+4.0+web+forms"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/12/11/easy-url-rewriting-in-asp-net-4-0-web-forms.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8107397" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="ASP.NET 4.0" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+4.0/default.aspx" /></entry><entry><title>new solution explorer feature in visual studio11 developer preview</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/10/new-solution-explorer-feature-in-visual-studio11-developer-preview.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/10/new-solution-explorer-feature-in-visual-studio11-developer-preview.aspx</id><published>2011-10-09T18:16:32Z</published><updated>2011-10-09T18:16:32Z</updated><content type="html">&lt;p&gt;Microsoft Visual Studio11 Developer preview comes with bunch of new features and Solution explorer is also get some new features in it. There are few new icons added at top of solution explorer like below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorerVisualStudio2011_10EF5590.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Solution exploer new features in visual studio 2011-http://www.dotnetjalps.com" border="0" alt="Solution exploer new features in visual studio 2011-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorerVisualStudio2011_thumb_7FBB77EC.png" width="504" height="530" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h4&gt;Create new window with copy of this Window Feature:&lt;/h4&gt;  &lt;p&gt;Now there is a one feature given with solution explorer you can create a another instance of solution explorer via clicking on last icon on solution explorer. Once you click the Last Icon for create copy. It will open a new solution explorer windows as below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/CopySolutionExplorerWindow_6787E7C4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Copy solution exploer in visual studio 11-http://www.dotnetjalps.com" border="0" alt="Copy solution exploer in visual studio 11-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/CopySolutionExplorerWindow_thumb_439F106A.png" width="504" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;Properties in Solution Explorer:&lt;/h4&gt;  &lt;p&gt;Now only you can not only the see the properties of class but you can also see the methods property. Once you double-click class then it will show all methods available when you double-click method it will load the code in editor like in below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Properties_3845D660.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Solution exploer properties in visual sutio11-http://www.dotnetjalps.com" border="0" alt="Solution exploer properties in visual sutio11-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Properties_thumb_2E313535.png" width="504" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now once you click Page_load method you will see the page_load highlighted&amp;#160; in code editor&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Page_load_3E10542C.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Highted code from solution explorer properties-http://www.dotnetjalps.com" border="0" alt="Highted code from solution explorer properties-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Page_load_thumb_1A93AFC7.png" width="504" height="225" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;Previous next view in solution explorer:&lt;/h4&gt;  &lt;p&gt;You can move previous and next with solution explorer. For example you have search with about like following .&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorerContains_275DE018.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SolutionExplorerContains" border="0" alt="SolutionExplorerContains" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorerContains_thumb_2390157B.png" width="504" height="506" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It will search and load About us view like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorePreviousNext_44736255.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SolutionExplorePreviousNext" border="0" alt="SolutionExplorePreviousNext" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SolutionExplorePreviousNext_thumb_07FAEDAB.png" width="504" height="396" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see in above image this is About us view and you can also see that first previous button is enabled. Now once you click that it will return to default view.&lt;/p&gt;  &lt;h4&gt;Search in Solution Explorer:&lt;/h4&gt;  &lt;p&gt;Now in Solution explorer search is also provided you can search specific item in solution explorer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/SearchinSolutionsExplorer_6A58ECDE.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="SearchinSolutionsExplorer" border="0" alt="SearchinSolutionsExplorer" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SearchinSolutionsExplorer_thumb_58B8DC46.png" width="504" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see in above image it is a incremental search so when you start typing it will start searching. &lt;/p&gt;  &lt;p&gt;That’s it. Hope you like it. Stay tuned for more.. Till then happy programming..&lt;/p&gt;  &lt;p&gt;Namaste!!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f10%2f10%2fnew-solution-explorer-feature-in-visual-studio11-developer-preview.aspx&amp;amp;title=new+solution+explorer+feature+in+visual+studio11+developer+preview"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/10/new-solution-explorer-feature-in-visual-studio11-developer-preview.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7988139" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="C#.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_23002E00_NET/default.aspx" /></entry><entry><title>ASP.NET MVC 4.0 Mobile Template</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/09/asp-net-mvc-4-0-mobile-template.aspx" /><id>http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/09/asp-net-mvc-4-0-mobile-template.aspx</id><published>2011-10-09T08:22:23Z</published><updated>2011-10-09T08:22:23Z</updated><content type="html">&lt;p&gt;Microsoft has released the much awaited ASP.NET MVC 4.0 developer preview and there are lots of features bundle with it. One of the greatest features is a mobile website. Yes, Now with ASP.NET MVC 4.0 you can create mobile site also. So let’s create a simple application and let’s see how it works.&lt;/p&gt;  &lt;p&gt;To create mobile site first you need to click File-&amp;gt;New Project-&amp;gt;ASP.NET MVC 4.0 Web application. Like following.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/NewHelloWorld_4F2062CB.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Hello world ASP.NET MVC 4.0 Mobile site-www.dotnetjalps.com" border="0" alt="Hello world ASP.NET MVC 4.0 Mobile site-www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/NewHelloWorld_thumb_7E422895.png" width="504" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now once you click OK it will open a new another dialog like following where we have to choose the Mobile site.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Mobile_388D78AA.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Mobile Application with asp.net mvc 4.0-www.dotnetjalps.com" border="0" alt="Mobile Application with asp.net mvc 4.0-www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Mobile_thumb_3F10D26D.png" width="504" height="454" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see in above post I have selected Razor view Once you click it will create a new application like following. As you can see similar structure as normal MVC Application application below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/MobieSite_7FFF0637.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ASP.NET MVC 4.0 Mobile Structure-http://www.dotnetjalps.com" border="0" alt="ASP.NET MVC 4.0 Mobile Structure-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/MobieSite_thumb_0A4004CB.png" width="504" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This view are based on the standard jQuery Mobile. So this can be viewed in any tablet or mobile device. So if you have IPad and IPhone both then it will work on both. You need not to different application for both. see the browser first I have selected standard IPad size of browser.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/Ipad_1A1F23C2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Ipad" border="0" alt="Ipad" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Ipad_thumb_60003115.png" width="504" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now lets see how it look in mobile. So I have made my browser same site as mobile. As you can see its working in both.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/jalpeshpvadgama/MobileIPhone_3AD2C0DC.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Mobile View with ASP.NET MVC 4.0-http://www.dotnetjalps.com" border="0" alt="Mobile View with ASP.NET MVC 4.0-http://www.dotnetjalps.com" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/MobileIPhone_thumb_16118398.png" width="504" height="861" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you see the code of view you can see the razor syntax over there. Nothing change in razor syntax. But as you can see in below code you need to use Jquery mobile attributes like data-Role and other stuff which will convert standard HTML into mobile or device compatible website.&lt;/p&gt;  &lt;pre class="brush: csharp; highlight: [2];"&gt;&amp;lt;ul data-role=&amp;quot;listview&amp;quot; data-inset=&amp;quot;true&amp;quot;&amp;gt;
    &amp;lt;li data-role=&amp;quot;list-divider&amp;quot;&amp;gt;Navigation&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;About&amp;quot;, &amp;quot;About&amp;quot;, &amp;quot;Home&amp;quot;)&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;@Html.ActionLink(&amp;quot;Contact&amp;quot;, &amp;quot;Contact&amp;quot;, &amp;quot;Home&amp;quot;)&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;&lt;/pre&gt;

&lt;p&gt;That's it. It’s very easy you can create mobile compatible site in few hours. Hope you like it. Stay tuned for more.. Till then happy programming.&lt;/p&gt;

&lt;p&gt;Namaste!!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;div class="shoutIt"&gt;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fweblogs.asp.net%2fjalpeshpvadgama%2farchive%2f2011%2f10%2f09%2fasp-net-mvc-4-0-mobile-template.aspx&amp;amp;title=ASP.NET+MVC+4.0+Mobile+Template"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http://weblogs.asp.net/jalpeshpvadgama/archive/2011/10/09/asp-net-mvc-4-0-mobile-template.aspx" style="border:0px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7987832" width="1" height="1"&gt;</content><author><name>Jalpesh P. Vadgama</name><uri>http://weblogs.asp.net/members/Jalpesh-P.-Vadgama.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET/default.aspx" /><category term="C#.NET" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/C_23002E00_NET/default.aspx" /><category term="ASP.NET MVC" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+MVC/default.aspx" /><category term="ASP.NET MVC 4.0" scheme="http://weblogs.asp.net/jalpeshpvadgama/archive/tags/ASP.NET+MVC+4.0/default.aspx" /></entry></feed>
