<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://aspadvice.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Student Blog</title><link>http://aspadvice.com/blogs/kumarr/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>Change the border color of the controls whose validation fails</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx</link><pubDate>Tue, 27 Sep 2005 02:21:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:12901</guid><dc:creator>kreddi</dc:creator><slash:comments>11</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/12901.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=12901</wfw:commentRss><description>&lt;P&gt;Ever wondered how you can change the border color settings of the control whose client side validation fails, so you can catch the user attention easily.. Well I did. I tried with the asp.net validation controls given by the .net framework, but none of those validation controls facilitate this. So, I dug around little deeper and found a way to do that. Ofcourse, that involves modifying the WebUIValidation.js file provided with asp.net.&lt;/P&gt;
&lt;P&gt;For folks who are wondering what&amp;nbsp; this WebUIValidation.js file does. This is a javascript file provided by microsoft with all the javascript code used by the various asp.net validation controls. This file is found in the "aspnet_client\system_web\1_1_4322" folder under your wwwroot folder&lt;/P&gt;
&lt;P&gt;Ok. Lets get to the point here.&lt;/P&gt;
&lt;P&gt;Ohh.. by the way, I am assuming we all use ValidationSummary control in our pages to summarise all the validation error messages at one place, if not this may not be much helpful to you, although this trick may give you some clues&lt;/P&gt;
&lt;P&gt;Before we begin&amp;nbsp;place the following javascript function somewhere in the WebUIValidation.js file&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;function&lt;/FONT&gt;&lt;FONT size=2&gt; changeBorder(id)&lt;/P&gt;
&lt;P&gt;{ &lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;var&lt;/FONT&gt;&lt;FONT size=2&gt; control = document.getElementById(id);&lt;/P&gt;
&lt;P&gt;control.style.borderWidth = "1px";&lt;/P&gt;
&lt;P&gt;control.style.borderStyle = "solid";&lt;/P&gt;
&lt;P&gt;control.style.borderColor="red";&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Now....&lt;/P&gt;
&lt;P&gt;Look for the function named &lt;FONT size=2&gt;&lt;FONT color=#a52a2a&gt;ValidationSummaryOnSubmit &lt;FONT color=#000000&gt;in the WebUIValidation.js file. This method is used by the validation summary control to iterate through&amp;nbsp; all the invalid controls and output their error messages in certain format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;If you look inside the method, you notice that there is a conditional block, which checks to see if the Page is valid..&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; (!Page_IsValid) {&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000 size=2&gt;......&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;In this If loop, there is a "for" loop, which iterates through all the invalid controls..&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (i=0; i&amp;lt;Page_Validators.length; i++) {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!Page_Validators[i].isvalid &amp;amp;&amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(Page_Validators[i].errormessage) == "string") {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#008000 size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;s += pre + Page_Validators[i].errormessage + post;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;} &lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;In this loop put the following code&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;changeBorder(Page_Validators[i].controltovalidate);&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3&gt;Now the above for loop would look something like this&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;for&lt;/FONT&gt;&lt;FONT size=2&gt; (i=0; i&amp;lt;Page_Validators.length; i++) {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!Page_Validators[i].isvalid &amp;amp;&amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(Page_Validators[i].errormessage) == "string") {&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;/*Your&amp;nbsp; Code -- Not Microsoft's*/&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;changeBorder(Page_Validators[i].controltovalidate);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;/*End of&amp;nbsp;Your Code*/&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;s += pre + Page_Validators[i].errormessage + post;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;} &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3&gt;Thats all.. All of your invalid controls will have a thin red border color when they are invalid&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;/FONT&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;;subject=Change+the+border+color+of+the+controls+whose+validation+fails" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;;title=Change+the+border+color+of+the+controls+whose+validation+fails" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;title=Change+the+border+color+of+the+controls+whose+validation+fails" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;;title=Change+the+border+color+of+the+controls+whose+validation+fails" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx&amp;amp;;title=Change+the+border+color+of+the+controls+whose+validation+fails&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/09/27/12901.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=12901" width="1" height="1"&gt;</description></item><item><title>How to prevent default button from firing</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx</link><pubDate>Sun, 26 Jun 2005 20:47:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2689</guid><dc:creator>kreddi</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2689.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2689</wfw:commentRss><description>&lt;P&gt;In my &lt;A href="http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;previous&lt;/A&gt; &lt;A href="http://aspadvice.com/blogs/kumarr/category/313.aspx"&gt;Tips and Tricks&lt;/A&gt; blog&amp;nbsp;entry I talked about&amp;nbsp;a workaround for &lt;a title="" href="http://www.asp.net" target="_blank"&gt;ASP.NET&lt;/a&gt; not submitting when the Enter key is pressed on the keyboard. Now in this blog entry lets talk about how to prevent the button from submitting the form when you press&amp;nbsp;ENTER&amp;nbsp;key on the keyboard. Its very simple.. we need to capture the &lt;FONT color=#0000ff&gt;keycode&lt;/FONT&gt; from the &lt;FONT color=#0000ff&gt;onkeypress&lt;/FONT&gt; event of the form and return false &lt;/P&gt;
&lt;P&gt;This is the code to capture the ENTER keycode...&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#808080&gt;&amp;lt;script language="javascript"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function test() &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (window.event.keyCode == 13) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.cancelBubble = true; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.returnValue = false;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/script&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This is the code to for the form wide onkeypress event.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#808080&gt;&amp;lt;form id="Form1" onkeypress="test();" method="post" runat="server"&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You could customize this.. If you want to prevent the button to submit only for a particular textbox, you could just capture the onkeypress event for that textbox and but not the whole form&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;;subject=How+to+prevent+default+button+from+firing" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;;title=How+to+prevent+default+button+from+firing" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;title=How+to+prevent+default+button+from+firing" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;;title=How+to+prevent+default+button+from+firing" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx&amp;amp;;title=How+to+prevent+default+button+from+firing&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2689.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2689" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/kumarr/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Pressing Enter key does not submit asp.net form</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx</link><pubDate>Sun, 26 Jun 2005 20:26:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2688</guid><dc:creator>kreddi</dc:creator><slash:comments>6</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2688.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2688</wfw:commentRss><description>&lt;P&gt;This is one of the first problem I encountered after I started working in &lt;a title="" href="http://www.asp.net" target="_blank"&gt;ASP.NET&lt;/a&gt;. The webform does not submit or postback when I click &amp;#8220;Enter&amp;#8221; key on the keyboard when there is only one textbox on the form. I heard this as a bug in IE. It seem to work as it is supposed to be in FireFox. &lt;/P&gt;
&lt;P&gt;So, the workaround for this is to add another input control of type text and make it invisible if you do not want it to, by making its width and height to be set to&amp;nbsp;'0'&lt;/P&gt;
&lt;P&gt;&amp;lt;input id=test1&amp;nbsp; style="WIDTH: 0px; HEIGHT: 0px" type=text &amp;gt; &amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;;subject=Pressing+Enter+key+does+not+submit+asp.net+form" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;;title=Pressing+Enter+key+does+not+submit+asp.net+form" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;title=Pressing+Enter+key+does+not+submit+asp.net+form" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;;title=Pressing+Enter+key+does+not+submit+asp.net+form" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx&amp;amp;;title=Pressing+Enter+key+does+not+submit+asp.net+form&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2688.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2688" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/kumarr/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>How to Prefill password into TextBox web control</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx</link><pubDate>Sun, 26 Jun 2005 18:14:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2687</guid><dc:creator>kreddi</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2687.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2687</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;This is one of the commonly asked question I have seen recently on &lt;A title="" href="http://www.asp.net" target=_blank&gt;ASP.NET&lt;/A&gt; forums. Logically speaking you shouldnt try to prefill a password textbox field for security reasons. But, if the application size and scope warrant a cheap trick to prefill password field, then keep reading....&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Lets say you have a password &amp;#8220;pwd&amp;#8220;, which you retrived from database of session and you want to assign it to the .Text property of password textbox control.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;You would say &lt;FONT color=#0000ff&gt;passText.Text=&amp;#8220;pwd&amp;#8220;;&lt;/FONT&gt; and run the page. So you expect the password to be prefilled in the password field, when you see the actual page in the browser..But &lt;A title="" href="http://www.asp.net" target=_blank&gt;ASP.NET&lt;/A&gt; simply ignores it and display's a blank password field (Ofcourse that is exactly what it is designed to do)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Now lets say you want to find a workaround even if it means to compromise on the security.. keep reading..&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;As you know, we add client side properties with the &lt;FONT color=#0000ff&gt;Attributes.Add()&lt;/FONT&gt; method for web server controls. So to your pasword field.. add the password to the &amp;#8220;value&amp;#8220; property. Remember a texbox is rendered as the INPUT html field and the .Text property will become &amp;#8220;value&amp;#8220; property for the input control.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial color=#0000ff size=2&gt;passText.Attributes.Add("value", &amp;#8220;pwd&amp;#8220;); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;This will instruct the &lt;A title="" href="http://www.asp.net" target=_blank&gt;ASP.NET&lt;/A&gt; to assign the password to the value property of the html input control&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Even here, as you can&amp;nbsp; see you are just manipulating the html version of this control. &lt;A title="" href="http://www.asp.net" target=_blank&gt;ASP.NET&lt;/A&gt; does not let you assign a value to a password field from the code behind&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Arial size=2&gt;Caution: If you try to use this workaround.. keep in mind that anyone can see the password by looking at the html source of the rendered html&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;;subject=How+to+Prefill+password+into+TextBox+web+control" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;;title=How+to+Prefill+password+into+TextBox+web+control" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;title=How+to+Prefill+password+into+TextBox+web+control" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;;title=How+to+Prefill+password+into+TextBox+web+control" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx&amp;amp;;title=How+to+Prefill+password+into+TextBox+web+control&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/26/2687.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2687" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/kumarr/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category></item><item><title>Hi Everybody</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx</link><pubDate>Tue, 21 Jun 2005 21:05:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2686</guid><dc:creator>kreddi</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2686.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2686</wfw:commentRss><description>&lt;FONT face=Arial size=2&gt;I used to blog @ &lt;/FONT&gt;&lt;A href="http://kumarreddi.blogspot.com"&gt;&lt;FONT face=Arial size=2&gt;http://kumarreddi.blogspot.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial size=2&gt;. I thought of changing the blog to some technology specific site. So, I requested the admin's to provide me with the blogspace in aspadvice servers. And they are kind enough to oblige to my request. Anyway, the posts below this are the posts I made on the previous blog site. I just transferred them from that site. For anybody wondering what's with the hoopla....I am just a rookie blogger&lt;/FONT&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;;subject=Hi+Everybody" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;;title=Hi+Everybody" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;title=Hi+Everybody" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;;title=Hi+Everybody" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx&amp;amp;;title=Hi+Everybody&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2686.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2686" width="1" height="1"&gt;</description></item><item><title>MSDE 2000 install </title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx</link><pubDate>Tue, 21 Jun 2005 21:00:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2684</guid><dc:creator>kreddi</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2684.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2684</wfw:commentRss><description>&lt;SPAN style="FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial&gt;&lt;FONT size=3&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;Today I was installing MSDE 2000 Release A on my machine, since our company do not allow us to install SQL Server on our work stations. &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;I noticed MSDE 2000 Release A does not come with the two highly mentioned sample databases "NorthWind" and "Pubs". But luckily if you have VS.NET 2003, you allready have the sql files for these two databases, you need to run these files against your MSDE instance using osql utility. The following is the sample command to install these two data bases&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;C:\&amp;gt;osql -E -S (local)\VSDOTNET -i instnwnd.sql&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;Also, sometimes it gets tricky installing MSDE on our machine. For anyone's information, you should use the following procedure to install MSDE 2000&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;Open the setup.ini file in ur C:\MSDERelA &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;Add the lines under the [options]&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;INSTANCENAME=VSDOTNET &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;DISABLENETWORKPROTOCOLS=1 &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;SAPWD=urPassword&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;After saving the setuo.ini file run the setup with these arguments&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;setup /L*v C:/MSDELog.log&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;Oh yeah, one more tricky thing is, MSDE setup at times do not notify you that, set up is completed. So, if you are unsure about it, restart the computer and see if the Service Manager starts in the system tray.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;;subject=MSDE+2000+install+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;;title=MSDE+2000+install+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;title=MSDE+2000+install+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;;title=MSDE+2000+install+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx&amp;amp;;title=MSDE+2000+install+&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2684.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2684" width="1" height="1"&gt;</description></item><item><title>Application Domains in .NET </title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx</link><pubDate>Tue, 21 Jun 2005 21:00:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2685</guid><dc:creator>kreddi</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2685.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2685</wfw:commentRss><description>&lt;DIV&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;In .NET, the primary application boundary is not a process, but Application domain. Lets see some of the differences between these two&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;EM&gt;&lt;FONT face=Arial size=2&gt;Operating System Process&lt;/FONT&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 85%"&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;Each process has its own virtual address space, executable code, and data&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;A windows process cannot directly access the code or data of another windows process&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;A windows process runs only one application, so if an application crashes, it does not affect other applications&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;Processes are efficient in isolating applications, but they require expensive IPC mechanisms to communicate&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;A process is a vary low level operating system construct; the exact behavior of a process is determined by the operating system. Thus a windows 2000 process is very different from a Unix process &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;Remember, when a processor switches between processes, the processor must save and reset the execution context of the processes. This takes lot of resources&lt;BR&gt;&lt;BR&gt;Instead of a process, the basic unit of isolation for running applications in the CLR is an application domain. CLR allows several application domains to run within a single windows process&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;Application domain:&lt;/EM&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;An application domain is the .NET runtime&amp;#8217;s representation of a logical process&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;Each application domain contains its own set of code, data and configuration settings&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;An application domain cannot directly access the code or data structures of another application domain&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;Code running in one application domain cannot affect other application domains. CLR can terminate an application domain without stopping the entire process&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;Application domain hides operating system&amp;#8217;s details of a process. This allows .NET to be ported to a variety of operating systems&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;
&lt;LI&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;Application domains allow the .NET runtime to optimize communication between applications running in the same process where expensive IPC mechanisms are not required&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;An Application domain can be created using AppDomain class of System namespace. However, in most cases the application domains created and managed by the runtime hosts that execute your code. Runtime hosts provide the environment to run managed code on behalf of the user. The following three runtime hosts come with .net installation&lt;BR&gt;Windows shell&lt;BR&gt;ASP.NET&lt;BR&gt;Internet Explorer&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;;subject=Application+Domains+in+.NET+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;;title=Application+Domains+in+.NET+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;title=Application+Domains+in+.NET+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;;title=Application+Domains+in+.NET+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx&amp;amp;;title=Application+Domains+in+.NET+&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2685.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2685" width="1" height="1"&gt;</description></item><item><title>What is the need of extensions in the urls</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx</link><pubDate>Tue, 21 Jun 2005 20:59:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2682</guid><dc:creator>kreddi</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2682.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2682</wfw:commentRss><description>&lt;DIV&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;Recently a user asked the following question in the microsoft's asp.net forum&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;Can I serve the asp.net pages without the extensions, like&lt;/SPAN&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://site.com/page1"&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial color=#5588aa size=2&gt;http://site.com/page1&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt; instead of &lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://site.com/page1.aspx"&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial color=#5588aa size=2&gt;http://site.com/page1.aspx&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt; &lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;I thought its an interesting post. I thought of writing what is the importance of extensions in the url with respect to IIS.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;The first thing that happens, when a user types in a url is, IIS receives the request for the page. IIS looks up at the extension of the url, and then decide what to do with it. Sometimes IIS handles the request by itself, othertimes it has to delegate the work to some other process, as I said its all based on the extension. &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;If the request is for, lets say for html page or for some image content or some other static content, IIS handles the request by itself.But if the request is for, lets say for a asp page (.asp extension), then IIS forwards this request to asp.dll ISAPI. Then this dll takes over the execution and serves the page back to IIS, which will send the response to the user. Similarly for asp.net pages (.aspx, .asmx, .ascx..), aspnet_isapi.dll handles the request, which will forward the request to the worker process, which will execute the application in an application domain. &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;So, all this forwarding to isapi dll's would not be possible without extensions in the url.&lt;/SPAN&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;;subject=What+is+the+need+of+extensions+in+the+urls" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;;title=What+is+the+need+of+extensions+in+the+urls" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;title=What+is+the+need+of+extensions+in+the+urls" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;;title=What+is+the+need+of+extensions+in+the+urls" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx&amp;amp;;title=What+is+the+need+of+extensions+in+the+urls&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2682.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2682" width="1" height="1"&gt;</description></item><item><title>View State Is Invalid Error message when using Server.Transfer </title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx</link><pubDate>Tue, 21 Jun 2005 20:59:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2683</guid><dc:creator>kreddi</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2683.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2683</wfw:commentRss><description>&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;This is a very common error message we get when we use Server.Transfer with the second parameter set to true, which indicates transferring QueryString as well as Form collection, which contains information about the Form elements.&lt;BR&gt;The common workaround we do is to set EnableViewStateMac to false.&lt;BR&gt;&lt;BR&gt;But I read in an article today, that when we store sensitive information in the Viewstate, setting EnableViewStateMac to false, opens a big security hole. Microsoft would not suggest doing this. They suggest transferring server control elements in other ways, setting the element accessors as public. See the following article if you want to know what I am talking about&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;316920"&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial color=#5588aa size=2&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;316920&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt; &lt;/SPAN&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;;subject=View+State+Is+Invalid+Error+message+when+using+Server.Transfer+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;;title=View+State+Is+Invalid+Error+message+when+using+Server.Transfer+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;title=View+State+Is+Invalid+Error+message+when+using+Server.Transfer+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;;title=View+State+Is+Invalid+Error+message+when+using+Server.Transfer+" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx&amp;amp;;title=View+State+Is+Invalid+Error+message+when+using+Server.Transfer+&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2683.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2683" width="1" height="1"&gt;</description></item><item><title>Session and Cookies</title><link>http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx</link><pubDate>Tue, 21 Jun 2005 20:58:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2681</guid><dc:creator>kreddi</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/kumarr/comments/2681.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/kumarr/commentrss.aspx?PostID=2681</wfw:commentRss><description>&lt;DIV&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;FONT face=Arial size=2&gt;I have seen so many posts in newsgroups asking questions related to cookies and their relationship with asp.net session. So, I thought of making a small post explaining the role cookies play in asp.net session&lt;BR&gt;&lt;BR&gt;Typical SessionState element in a web.config file looks as follows&lt;BR&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;BR&gt;&lt;/EM&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: #000099"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;sessionState &lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #ff0000"&gt;mode&lt;/SPAN&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: #000066"&gt;&lt;SPAN style="COLOR: #000099"&gt;"InProc"&lt;/SPAN&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #ff0000"&gt;stateConnectionString&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"tcpip=127.0.0.1:42424"&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #ff0000"&gt;sqlConnectionString&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"data source=127.0.0.1;Trusted_Connection=yes"&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #ff0000"&gt;cookieless&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"false"&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="COLOR: #ff0000"&gt;timeout&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"20" &lt;/SPAN&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="COLOR: #000099"&gt;/&amp;gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;BR&gt;Most of us are pretty familiar with the first three attributes, which simply give the information about where the session state is stored. So, let&amp;#8217;s jump to the &lt;EM&gt;&lt;SPAN style="COLOR: #ff0000"&gt;cookieless&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"false&amp;#8221;&lt;/SPAN&gt;&lt;/EM&gt; attribute&lt;BR&gt;&lt;BR&gt;This attribute tells the asp.net whether to use cookies to store the session identifier or not.&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;&lt;STRONG&gt;Little background&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR&gt;Anytime, you request a page from the web server by making a GET request or POST request, asp.net runs the page in a session. If the session already exists asp.net simply executes the page in that session, if not it would create a new session to serve the request. As you know, asp.net along with many web technologies is state less, i.e. a request has no knowledge of the previous or the next requests. Therefore, asp.net will have no idea if the request you made is the first request, so it needs to create a session for you, or you made a second request, so it needs to use the previously created session. So, there needs to be some mechanism to inform asp.net to use previously created session information if it hasn&amp;#8217;t been timed out and not go crazy and create 100 sessions for 100 requests. That is exactly what we are trying to do with the Cookieless attribute in the above sessionState element&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;Lets look at the two solutions .net provide to solve this problem&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;/SPAN&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;SPAN style="FONT-SIZE: 85%; FONT-FAMILY: verdana"&gt;&lt;STRONG&gt;&lt;EM&gt;First Solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR&gt;When you have &lt;SPAN style="COLOR: #ff0000"&gt;cookieless&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"false"&lt;/SPAN&gt; we are telling asp.net to store the identifier of the session it created in a temporary browser cookie. So, the next time we make a new request or do a postback within the same browser, asp.net would read this browser cookie and determine that this request belongs to the previously created session. If that session hasn&amp;#8217;t timed out, asp.net simply serves the request and use that session information without creating a new session&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;&lt;SPAN style="COLOR: #666666"&gt;&lt;STRONG&gt;Caveat&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;BR&gt;If your browser does not accept cookies and you have &lt;SPAN style="COLOR: #ff0000"&gt;cookieless&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"false"&lt;/SPAN&gt;, then you are busted. Asp.net would create a new session for every request you make, whether it is a GET or POST request and you wouldn&amp;#8217;t be able to use any session information you stored between your requests. The reason for this behavior is, you are telling the asp.net to use cookie to store the session identifier and yet not providing a browser setting which accept the cookies.&lt;BR&gt;&lt;BR&gt;So to get around this problem, please adjust your browser security settings to allow cookies. The typical security setting for browser to accept cookies is Medium High&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&lt;EM&gt;Second Solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR&gt;Now the second case , when you have &lt;SPAN style="COLOR: #ff0000"&gt;cookieless&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #000099"&gt;"true"&lt;/SPAN&gt; you are telling asp.net not to use cookies to store the session identifier. So, in this case our poor asp.net gets panicked and mess up with the url&amp;#8217;s. A typical url in this case looks as follows&lt;BR&gt;&lt;BR&gt;&lt;EM&gt;http://www.yourdomain.com/(v5j2hoqkijx0dsqwry1kpojx)/yourPage.aspx&lt;/EM&gt;&lt;BR&gt;&lt;BR&gt;You could see that crazy text appended between your domain name and your page address. As you guessed it is the session id. So, asp.net creates this mangled url&amp;#8217;s incase you do not let it to use cookies to store the session identifier. The advantage of this approach is, you are not making any assumptions about the browser behavior, but the disadvantage is the urls are not user friendly and can not be book marked.&lt;/SPAN&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;;subject=Session+and+Cookies" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;;title=Session+and+Cookies" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;title=Session+and+Cookies" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;;title=Session+and+Cookies" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx&amp;amp;;title=Session+and+Cookies&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/kumarr/archive/2005/06/21/2681.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2681" width="1" height="1"&gt;</description></item></channel></rss>