<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-130332343539681531</id><updated>2011-12-27T23:01:20.503-08:00</updated><title type='text'>DotNET for Beginners</title><subtitle type='html'>I would mainly concentrate on concepts related to asp.net. However, once in a while you may find posts relating to winforms. Let me stress that the concepts discussed here are for beginners.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-3127840302572509491</id><published>2009-03-12T05:11:00.001-07:00</published><updated>2009-03-12T05:34:30.281-07:00</updated><title type='text'>C# Word Insert Page numbers in Footer</title><content type='html'>To use this code you need to add reference to the word object. &lt;a href="http://digdotnet.blogspot.com/2009/03/c-word-doc-file-insert-text-and-date.html"&gt;See this post.&lt;/a&gt;&lt;br /&gt;To insert page numbers automatically to your word document is super easy.&lt;br /&gt;The steps are always.&lt;br /&gt;&lt;br /&gt;1. Open the word document&lt;br /&gt;2. Insert page number (in footer)&lt;br /&gt;3. Save the document to a new location&lt;br /&gt;4. quit application.&lt;br /&gt;&lt;br /&gt;Here is the code to do that.&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;string inputFilePath = @"C:\Documents and Settings\prgu\My Documents\myinputfile.doc";&lt;br /&gt;            string outPutFilePath = @"C:\Documents and Settings\prgu\My Documents\myoutputfile.doc";&lt;br /&gt;&lt;br /&gt;            object Missing = System.Reflection.Missing.Value;&lt;br /&gt;            object fileToOpen = (object)@inputFilePath;&lt;br /&gt;            object fileToSave = (object)@outPutFilePath;&lt;br /&gt;            Word.Application app = new Word.ApplicationClass();&lt;br /&gt;            Word.Document doc = new Word.Document();&lt;br /&gt;&lt;br /&gt;            //set this to true, else it will actually open the word file in MS word&lt;br /&gt;            object myreadonly = true;&lt;br /&gt;&lt;br /&gt;            //open the word document&lt;br /&gt;            doc = app.Documents.Open(ref fileToOpen,&lt;br /&gt;          ref Missing, ref myreadonly, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;br /&gt;            //Insert Page numbers&lt;br /&gt;            Word.Window activeWindow = doc.Application.ActiveWindow;&lt;br /&gt;            //define a currentpage object&lt;br /&gt;            object currentPage = Word.WdFieldType.wdFieldPage;&lt;br /&gt;            activeWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekCurrentPageFooter;&lt;br /&gt;            //set alignment&lt;br /&gt;            activeWindow.ActivePane.Selection.Paragraphs.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;&lt;br /&gt;            //Add page number&lt;br /&gt;            activeWindow.Selection.Fields.Add(&lt;br /&gt;                activeWindow.Selection.Range, ref currentPage, ref Missing, ref Missing);&lt;br /&gt;            &lt;br /&gt;            // Go back to the Main Document view&lt;br /&gt;            activeWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekMainDocument;&lt;br /&gt;&lt;br /&gt;            //Finally we will save and close the doc&lt;br /&gt;            doc.SaveAs(ref fileToSave,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;br /&gt;            app.NormalTemplate.Saved = true;&lt;br /&gt;            doc.Close(ref Missing, ref Missing, ref Missing);&lt;br /&gt;            app.Quit(ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-3127840302572509491?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/3127840302572509491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=3127840302572509491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3127840302572509491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3127840302572509491'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2009/03/c-word-insert-page-numbers-in-footer.html' title='C# Word Insert Page numbers in Footer'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-5610472429914504557</id><published>2009-03-12T04:21:00.000-07:00</published><updated>2009-03-12T05:08:40.717-07:00</updated><title type='text'>C# Word (doc file) Insert Text and date into Header.</title><content type='html'>We will look at how to open a word file in your winforms application and insert a text into the header. Before we go into the code, there are some references you need to import into your application. Lets see how to do that in visual studio.&lt;br /&gt;&lt;br /&gt;1. Right click on the solution or the "references" folder and choose "add reference".&lt;br /&gt;2. In the add reference window, choose the "Com" tab and select "Microsoft  Word 11.0 Object Library" and click ok.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NJYCo16xsXg/Sbjz7T5btxI/AAAAAAAAANQ/RBEJiGrBfTk/s1600-h/addreference.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_NJYCo16xsXg/Sbjz7T5btxI/AAAAAAAAANQ/RBEJiGrBfTk/s400/addreference.jpg" alt="" id="BLOGGER_PHOTO_ID_5312263960762496786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;3. In your code behind Form1.cs add the following namespace.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;using Word = Microsoft.Office.Interop.Word;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;4. Now your application is configured properly.&lt;br /&gt;&lt;br /&gt;Lets look at the code that inserts a text into the header of the word file.&lt;br /&gt;It is well commented to make life easier.&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;string inputFilePath = @"C:\Documents and Settings\prasad\My Documents\myinputfile.doc";&lt;br /&gt;            string outPutFilePath = @"C:\Documents and Settings\prasad\My Documents\myoutputfile.doc";&lt;br /&gt;&lt;br /&gt;            object Missing = System.Reflection.Missing.Value;&lt;br /&gt;            object fileToOpen = (object)@inputFilePath;&lt;br /&gt;            object fileToSave = (object)@outPutFilePath;&lt;br /&gt;            Word.Application app = new Word.ApplicationClass();&lt;br /&gt;            Word.Document doc = new Word.Document();&lt;br /&gt;&lt;br /&gt;            //set this to true, else it will actually open the word file in MS word&lt;br /&gt;            object myreadonly = true;&lt;br /&gt;&lt;br /&gt;            //open the word document&lt;br /&gt;            doc = app.Documents.Open(ref fileToOpen,&lt;br /&gt;          ref Missing, ref myreadonly, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;          ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;br /&gt;            // Get todays date and convert it to string             &lt;br /&gt;            DateTime mydate = DateTime.Now;&lt;br /&gt;            mydate.ToString();&lt;br /&gt;&lt;br /&gt;            //Now the code to insert the header is&lt;br /&gt;            foreach (Word.Section wordSection in doc.Sections)             &lt;br /&gt;wordSection.Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = "My Header Text" + " Today is " + mydate;&lt;br /&gt;&lt;br /&gt;            //Finally we will save and close the doc&lt;br /&gt;            doc.SaveAs(ref fileToSave,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing, ref Missing,&lt;br /&gt;                 ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;br /&gt;            app.NormalTemplate.Saved = true;&lt;br /&gt;            doc.Close(ref Missing, ref Missing, ref Missing);&lt;br /&gt;            app.Quit(ref Missing, ref Missing, ref Missing);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope that helps someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-5610472429914504557?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/5610472429914504557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=5610472429914504557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/5610472429914504557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/5610472429914504557'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2009/03/c-word-doc-file-insert-text-and-date.html' title='C# Word (doc file) Insert Text and date into Header.'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NJYCo16xsXg/Sbjz7T5btxI/AAAAAAAAANQ/RBEJiGrBfTk/s72-c/addreference.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-3390888445296833599</id><published>2008-03-21T07:30:00.000-07:00</published><updated>2008-03-21T07:34:45.330-07:00</updated><title type='text'>A potentially dangerous Request.Form value was detected from the client</title><content type='html'>&lt;div style="text-align: justify;"&gt;This error is usually generated when a script code is being entered as text in a textbox in a webpage. This is a security measure introduced into .NET 1.1 as a precautionary measure. It helps in many cases, for example in guestbooks, forms etc where the information entered into the textboxes need to be displayed in the subsequent pages. Remember that its a very bad idea to use a label control in these cases. Its better to use a literal control instead.&lt;br /&gt;&lt;br /&gt;There could be cases where we donot want such a validation and desire that the user can enter html codes into the textboxes.  To disable this request validation just add the following directive to the page in question.&lt;br /&gt;&lt;br /&gt;ValidateRequest="false"&lt;br /&gt;&lt;br /&gt;NOTE: When the validationrequest value is false the users will be able to enter markup code into textboxes on the page and hence can change the rendering behaviour of the page or even worse hack the page!&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-3390888445296833599?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/3390888445296833599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=3390888445296833599' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3390888445296833599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3390888445296833599'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/potentially-dangerous-requestform-value.html' title='A potentially dangerous Request.Form value was detected from the client'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-4401201811359751051</id><published>2008-03-21T07:20:00.000-07:00</published><updated>2008-03-21T07:30:06.438-07:00</updated><title type='text'>Mode Property of a literal control</title><content type='html'>&lt;div style="text-align: justify;"&gt;As we know, a literal control is a control similar to a label control which helps us render text on a webpage in a simple fashion. More about a comparison of the label and literal control can be found&lt;a href="http://digdotnet.blogspot.com/2008/03/literal-control-vs-label-control.html"&gt; in this post&lt;/a&gt;. The literal control has a "Mode" property which specifies on how the contents of the literal control should be rendered. There are three values it can take namely, PassThrough, Encode and Transform.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;By default the "Mode" property is set to "Tranform". In this case the control will try to display the content based on the client that is requesting the information (in this case a browser). For example if the device is a mobile phone and asp.net realises that the mobile phone cannot correctly interpret the html markup then it will be removed as the page is rendered.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;The second "Mode" is the "Encode" mode. In this mode, the contents of the text property are converted into an html encoded string before rendering the webpage.&lt;br /&gt;For example the starting and closing tags are replaced by &amp;amp;lt; and &amp;amp;gt; respectively.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The last "Mode" is called "PassThrough" mode which will render the content exactly like we set it, without any modification.&lt;br /&gt;&lt;br /&gt;If you want to display the contents entered in textboxes but wanted to make sure that the user doesnt try to hack the system in whatever way by entering javascript or any other markup into the input then you need to set the Mode property of the literal control to "Encode" mode so that all the tags are not executed but rather converted into their html encoded strings.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-4401201811359751051?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/4401201811359751051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=4401201811359751051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/4401201811359751051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/4401201811359751051'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/mode-property-of-literal-control.html' title='Mode Property of a literal control'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-3255879918829734180</id><published>2008-03-21T06:45:00.000-07:00</published><updated>2008-03-21T07:36:36.993-07:00</updated><title type='text'>Literal Control Vs Label Control</title><content type='html'>&lt;div style="text-align: justify;"&gt;We are all aware of the label control and literal control, however, many a times we have the liberty to use either of them. In this post I will try to give you a scenario which will identify why and where you should use a literal control and not a label control.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Literal control is similar to a label control expect that the literal controls donot render any additional html markup. This obviously restricts the styling of the literal control unlike the label control which can be styled (using themes and skins). Many a times people mistake this to be a weakness of the literal control. Please note that this is not a weakness, rather it is its strength. The first obvious advantage is that it doesnt add any additional tags in the markup. Lets see this by dragging and dropping a literal control and a label control on the designer surface. Set their "Text" property to "Hello I am a literal control" and "Hello I am a Label control" respectively. If we now run this page and look at its source it will be as follows.&lt;br /&gt;&lt;/div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;Hello I am a literal control&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="Label1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Hello I am a label control&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;As you can see that there are no span tags etc wrapping around the literal control. Literal controls "Literally" output just the Text. On the other hand, the label control has a span tag surrounding it.&lt;br /&gt;&lt;br /&gt;Which are the best scenarios to use a literal control instead of a label control? Literal controls are usually recommended to use in forms, guestbooks or comment areas in a webpage where we need the end user to submit information that can be posted back on the webpage. If we use label controls in these scenarios and are not careful enough, the users could submit, html or javascript code that could completely change the rendering of the webpage or in the worst case Hack your webpage. Not convinced? Lets have an example.&lt;br /&gt;&lt;br /&gt;Create a webpage that has a Text Box, a Button, label control and a literal control.&lt;br /&gt;When the button is clicked, we would like to display the text entered in the textbox, by using the literal and label controls placed below the button. We do that using the OnClick event of the button control and the complete code for that is as follows.&lt;br /&gt;&lt;/div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="myTextBox"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Height&lt;/span&gt;&lt;span class="kwrd"&gt;="77px"&lt;/span&gt;&lt;br /&gt;   &lt;span class="attr"&gt;TextMode&lt;/span&gt;&lt;span class="kwrd"&gt;="MultiLine"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="361px"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;          &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnPost"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;br /&gt;   &lt;span class="attr"&gt;OnClick&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnPost_Click"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Post Message"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="myLabel"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;br /&gt;   &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Label Control Here"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Literal&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="myLiteral"&lt;/span&gt; &lt;span class="attr"&gt;Mode&lt;/span&gt;&lt;span class="kwrd"&gt;="Encode"&lt;/span&gt;&lt;br /&gt;&lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Literal Control Here"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Literal&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;Now just enter the following javascript to the text area and click on the post button.&lt;/div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;alert(&lt;span class="str"&gt;"Are You Hacked?"&lt;/span&gt;)&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;When you run the code, the little message box with "Are you Hacked?" is displayed. To understand how we got this message and its implications, lets look at the source code of the page.&lt;br /&gt;&lt;/div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="myTextBox"&lt;/span&gt; &lt;span class="attr"&gt;rows&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt;&lt;br /&gt;   &lt;span class="attr"&gt;cols&lt;/span&gt;&lt;span class="kwrd"&gt;="20"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="myTextBox"&lt;/span&gt;&lt;br /&gt;   &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="height:77px;width:361px;"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;script&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;alert(&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;Hacked!&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;)&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/script&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;textarea&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="submit"&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnPost"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="Post Message"&lt;/span&gt;&lt;br /&gt;     &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnPost"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="myLabel"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;alert(&lt;span class="str"&gt;"Hacked!"&lt;/span&gt;)&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;script&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;alert(&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;Hacked!&lt;span class="attr"&gt;&amp;amp;quot;&lt;/span&gt;)&lt;br /&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/script&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;As can be seen from the code above, the literal control actually replaces the beginning and end tags with the html encoded equivalent, whereas in the label control the tags are in place and hence the browser will run the script. This is of course not desired in many applications and hence the literal control comes in handy in these situations.  To make sure that the literal control works as desired above, assign the "Mode" property of the literal control to "Encode". More about the "Mode" property of the literal control,&lt;a href="http://digdotnet.blogspot.com/2008/03/mode-property-of-literal-control.html"&gt; in this post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;NOTE: if you get the error&lt;br /&gt;&lt;br /&gt;A potentially dangerous Request.Form value was detected from the client (myTextBox="&amp;lt;script&amp;gt;alert("Hacke...").&lt;br /&gt;&lt;br /&gt;Please see the&lt;a href="http://digdotnet.blogspot.com/2008/03/potentially-dangerous-requestform-value.html"&gt; following post&lt;/a&gt; for details.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-3255879918829734180?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/3255879918829734180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=3255879918829734180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3255879918829734180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/3255879918829734180'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/literal-control-vs-label-control.html' title='Literal Control Vs Label Control'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-6223541943246924082</id><published>2008-03-11T06:20:00.000-07:00</published><updated>2008-03-11T06:25:10.520-07:00</updated><title type='text'>Free Ajax book.</title><content type='html'>You can find a nice free ajax book here&lt;br /&gt;&lt;br /&gt;&lt;a href="http://magmainteractive.net/Book-Giveaway.aspx"&gt;http://magmainteractive.net/Book-Giveaway.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hurry up as the offer will end on 24th March 2008.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-6223541943246924082?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/6223541943246924082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=6223541943246924082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/6223541943246924082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/6223541943246924082'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/free-ajax-book.html' title='Free Ajax book.'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-5890939933084337693</id><published>2008-03-11T05:23:00.000-07:00</published><updated>2008-12-11T22:45:27.299-08:00</updated><title type='text'>Introduction to Asp.net 2.0 Folders</title><content type='html'>With the release of asp.net 2.0 the power and flexibility of asp.net has increased many folds. There are some special files and folders that came in with asp.net 2.0 to include more functionality.  We will now discuss the special folders and  what they actually mean and  where they should be used. You can add the required folders by right clicking on the project name in the solution explorer and then choose add asp.net folder.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NJYCo16xsXg/R9Z98Ib7CuI/AAAAAAAAAB0/eTduNykzv3E/s1600-h/folders_vs.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_NJYCo16xsXg/R9Z98Ib7CuI/AAAAAAAAAB0/eTduNykzv3E/s200/folders_vs.JPG" alt="" id="BLOGGER_PHOTO_ID_5176463293719186146" border="0" /&gt;&lt;/a&gt;The various folders that are available are:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. App_Code &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You should use this folder to store your custom classes, interfaces, business objects, structures, enums, typed dataset files etc.  The files which are placed in this folder are automatically available to  the  entire web application.  The asp.net runtime automatically compiles the files in this folder at runtime and generates an assembly which you can find in the bin folder.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. &lt;span style="font-weight: bold;"&gt;App_Data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This folder contains the data related items of the application including the .mdf files, XML files, csv files if any and also text files.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;3. App_Themes&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The themes feature in asp.net 2.0 allows us to build an application with &lt;span&gt;&lt;span class="Article_FullDescription"&gt;consistent layout and appearance across all pages of the application. It makes life so easy as a change in a single place reflects across the entire application. For this purpose it makes use of skins (.skin extension) and css files. All these files reside in this folder.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;App_GlobalResources&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The files that reside in this folder are resource files (.resx and .resources extension) that are available to the entire application and hence the name global. The resource files is an xml file that contains key value pairs. The values in the resource file can be modified by the user once the application is deployed without the need to recompile the whole application.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span class="Article_FullDescription"&gt;&lt;span style="font-weight: bold;"&gt;5. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;App_LocalResources&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;This folder contains resource files that are local to a webpage and cannot be seen by other webpages unlike the global resource files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. App_WebReferences&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;This folder is used to store  Web references,  discovery document files, schemas,  proxy classes, and other files associated with a particular Web service that your application connects to and makes use of. ( .disco,  .wsdl,  .xsd files that are generated when accessing remote web services)&lt;b&gt;.&lt;br /&gt;&lt;/b&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;7. App_Browsers&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This folder contains browser files (.browser extension). These files identify the kind of browser and its capabilities and are used by the asp.net runtime.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. &lt;/span&gt;&lt;b style="font-weight: bold;"&gt;Bin&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;This folder contains the compiled assembly files (.dll). &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-5890939933084337693?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/5890939933084337693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=5890939933084337693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/5890939933084337693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/5890939933084337693'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/introduction-to-aspnet-20-folders.html' title='Introduction to Asp.net 2.0 Folders'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NJYCo16xsXg/R9Z98Ib7CuI/AAAAAAAAAB0/eTduNykzv3E/s72-c/folders_vs.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-7446585982851977072</id><published>2008-03-11T03:03:00.000-07:00</published><updated>2008-12-11T22:45:27.501-08:00</updated><title type='text'>asp.net AjaX Tab Control - Colorful Themes</title><content type='html'>For a long time I had being finding a way to customize the tab control that comes with the &lt;a href="http://ajax.asp.net/ajaxtoolkit/"&gt;ajax toolkit&lt;/a&gt;. The instructions on the toolkit homepage were atleast for me, very confusing and I wasnt able to get it working. It is then I came across &lt;a href="http://mattberseth.com/blog/2007/09/more_sample_ajaxcontroltoolkit.html"&gt;this post&lt;/a&gt; by Matt Berseth. Wonderfully written and explained. I tried my hands on customizing the tab control with some more colors. What you need to do is the following:&lt;br /&gt;1. Download the stylesheet &lt;a href="http://swarnamaster.googlepages.com/StyleSheet.css"&gt;from here&lt;/a&gt;.&lt;br /&gt;2. Drag and Drop a tab container and a tab panel on to your designer surface.&lt;br /&gt;3. Change the &lt;span style="font-weight: bold;"&gt;"CssClass"&lt;/span&gt; property to the one give below for each design (example ajax__tab_orange-theme to get a orange theme).&lt;br /&gt;4. &lt;a href="http://swarnamaster.googlepages.com/images.zip"&gt;Download this zip file&lt;/a&gt; containing images. Make a folder called "images" and import all the images i nto the folder you just created.&lt;br /&gt;5. Donot forget to link your page to the stylesheet.&lt;br /&gt;Thats it! Enjoy the various themes.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Note&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The CssClass property for the particular themes along with their screenshots is given below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NJYCo16xsXg/R9Zfzob7CrI/AAAAAAAAABc/vRXo900JKfg/s1600-h/tabs-screen.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NJYCo16xsXg/R9Zgv4b7CsI/AAAAAAAAABk/wClifTL50kk/s1600-h/tabs-screen.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_NJYCo16xsXg/R9Zgv4b7CsI/AAAAAAAAABk/wClifTL50kk/s400/tabs-screen.jpg" alt="" id="BLOGGER_PHOTO_ID_5176431197428583106" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-7446585982851977072?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/7446585982851977072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=7446585982851977072' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/7446585982851977072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/7446585982851977072'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/aspnet-ajax-tab-control-colorful-themes.html' title='asp.net AjaX Tab Control - Colorful Themes'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NJYCo16xsXg/R9Zgv4b7CsI/AAAAAAAAABk/wClifTL50kk/s72-c/tabs-screen.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-476709049242212946</id><published>2008-03-05T10:18:00.000-08:00</published><updated>2008-03-05T12:12:46.982-08:00</updated><title type='text'>Email Validator (Using Validator Control)</title><content type='html'>In many webforms there are email fields where the user is intended to enter an email ID. Its always deirable to have the user enter a VALID email id. We will now see how to validate that the email is a right one. We will use the asp.net's RegularExpressionValidator. The complete code is as below.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RegularExpressionValidator&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="RegularExpressionValidator1"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ControlToValidate&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;ErrorMessage&lt;/span&gt;&lt;span class="kwrd"&gt;="Enter a Valid Email"&lt;/span&gt;&lt;br /&gt;&lt;span class="attr"&gt;ValidationExpression&lt;/span&gt;&lt;span class="kwrd"&gt;="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:RegularExpressionValidator&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;Email:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnSubmit"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Submit"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;In the code above, the Validation expression property of the regular expression validator is the part which does the email validation. For a tutorial on regular expressions follow &lt;a href=http://www.regular-expressions.info/tutorial.html&gt;this link&lt;/a&gt;. But the above code is very simple and wouldn't take care of complex checks. For example using the above code, an expression like d@a.c will still be a valid email address which most probably is not. A more complete email validator would have a regular expression as&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The above expression will check things like domain name in the email MUST have atleast 2 letters etc. A nice list of regular expressions for email validation and their list of checks can be &lt;a href=http://regexlib.com/DisplayPatterns.aspx&gt;found here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-476709049242212946?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/476709049242212946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=476709049242212946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/476709049242212946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/476709049242212946'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/03/email-validator-using-validator-control.html' title='Email Validator (Using Validator Control)'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-2625360400891990170</id><published>2008-02-27T01:01:00.000-08:00</published><updated>2008-12-11T22:45:27.850-08:00</updated><title type='text'>Dynamic Table using c#</title><content type='html'>In this example we are going to create a dynamic table in the code behind and going to populate the table with some sample controls. To start with, lets have the following things on the designer surface.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NJYCo16xsXg/R824sgbPvQI/AAAAAAAAAA0/IptZ3tfQlbE/s1600-h/dynamicTable.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_NJYCo16xsXg/R824sgbPvQI/AAAAAAAAAA0/IptZ3tfQlbE/s320/dynamicTable.jpg" alt="" id="BLOGGER_PHOTO_ID_5173994621676535042" border="0" /&gt;&lt;/a&gt;As can be seen I have 2 textboxes which take the number of rows and number of columns of our dynamic table as input. These rows and column numbers can also be generated and used directly in the code behind (variable in the code behind!).  We also have a button, which when clicked generates table dynamically. We also have a Panel to which we are going to add our Table control. The aspx code for the above page is&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; Rows:&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtRows"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="30px"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt; Cols:&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtCols"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Width&lt;/span&gt;&lt;span class="kwrd"&gt;="30px"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnTable"&lt;/span&gt; &lt;span class="attr"&gt;OnClick&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnTable_Click"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Generate"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Panel1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:Panel&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;On the button click event we will have the following C# Code.&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;protected void bttnTable_Click(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        //We read the number of rows and Columns for the table&lt;br /&gt;        int nrows = int.Parse(txtRows.Text);&lt;br /&gt;        int ncols = int.Parse(txtCols.Text);&lt;br /&gt;        // Create a Table and set its properties&lt;br /&gt;        Table mytable = new Table();&lt;br /&gt;        mytable.BorderWidth = 1;&lt;br /&gt;        mytable.BorderStyle = BorderStyle.Solid;&lt;br /&gt;        mytable.GridLines = GridLines.Both;&lt;br /&gt;        //Iterate through the rows and columns and add the controls&lt;br /&gt;        for (int i = 0; i &lt; nrows; i++)&lt;br /&gt;        {&lt;br /&gt;            TableRow tr = new TableRow();&lt;br /&gt;            for (int j = 0; j &lt; ncols; j++)&lt;br /&gt;            {&lt;br /&gt;                TableCell tc = new TableCell();&lt;br /&gt;                Label mylabel = new Label();&lt;br /&gt;                mylabel.Text = "Row:" + i + " " + "Col:" + " "+ j;&lt;br /&gt;                tc.Controls.Add(mylabel);&lt;br /&gt;                tr.Cells.Add(tc);&lt;br /&gt;            }&lt;br /&gt;            mytable.Rows.Add(tr);&lt;br /&gt;        }&lt;br /&gt;        //Add the table to the panel&lt;br /&gt;        Panel1.Controls.Add(mytable);&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the place where we add the label control we can add any control depending on the specific needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-2625360400891990170?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/2625360400891990170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=2625360400891990170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/2625360400891990170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/2625360400891990170'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/02/dynamic-table-using-c.html' title='Dynamic Table using c#'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_NJYCo16xsXg/R824sgbPvQI/AAAAAAAAAA0/IptZ3tfQlbE/s72-c/dynamicTable.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-4091096243460731717</id><published>2008-02-27T00:01:00.000-08:00</published><updated>2008-02-27T00:39:25.846-08:00</updated><title type='text'>Required Field Validator</title><content type='html'>In many webforms we come across scenarios where some fields should be made mandatory before they can submit the form. The required field validator was introduced into asp.net just for that purpose. Suppose we have a webform with 2 text boxes, name and email. What we would need now is to make the email field mandatory. That is if the user doesn't enter the email field and tries to submit the form, we need to give him a message saying that email is required. To do that add a required field validator (find it user the validation tab of visual studio) control and set its "Text" property to "Email Required" or any other error message that you want to post. Thats it. The complete code is given below.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RequiredFieldValidator&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="RequiredFieldValidator1"&lt;/span&gt;&lt;br /&gt;&lt;span class="attr"&gt;ControlToValidate&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;ErrorMessage&lt;/span&gt;&lt;span class="kwrd"&gt;="RequiredFieldValidator"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="EmailRequired"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;Name:&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;Email: &lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Button1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Submit"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;To make things interesting now..add another button saying something like "search" anywhere in the form. and try to run the application and press the search button instead..as you can see the form still does the validation check which was not intended to be done with the search button. There are 2 ways to get around this.&lt;br /&gt;Either set the "CausesValidation" property of the search button to "false" or set the  "ValidationGroup" property of both the validator and the submit button to the same name. The code with the second option is given below.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RequiredFieldValidator&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="RequiredFieldValidator1"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;ControlToValidate&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;span class="attr"&gt;ValidationGroup&lt;/span&gt;&lt;span class="kwrd"&gt;="myGroup"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;ErrorMessage&lt;/span&gt;&lt;span class="kwrd"&gt;="RequiredFieldValidator"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Email Required"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;Name:&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;Email: &lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtEmail"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Button1"&lt;/span&gt; &lt;span class="attr"&gt;ValidationGroup&lt;/span&gt;&lt;span class="kwrd"&gt;="myGroup"&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Submit"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="Button2"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Search"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;           &lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-4091096243460731717?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/4091096243460731717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=4091096243460731717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/4091096243460731717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/4091096243460731717'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/02/required-field-validator.html' title='Required Field Validator'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-2098503964009289025</id><published>2008-02-26T04:48:00.001-08:00</published><updated>2008-02-28T13:31:30.768-08:00</updated><title type='text'>Numeric Text Box</title><content type='html'>In many scenarios we would need textboxes where the user is intended to enter ONLY numbers. If a normal text box is used then making use of the entered text to do numeric calculations will lead to errors (if the user enters text instead of numbers!). There are two solutions to the above problem. The first one is to do a validation in the code to see if text (instead of number) is entered and then popup an error message. However an elegant solution would be to disallow the entry of characters other than numbers. For this we would need a "Number Only" or numeric textbox. In other words we would need a textbox that would only accept numbers. Here is the solution:&lt;br /&gt;&lt;br /&gt;Drag and drop a textbox (ID: TextBox1) on to the designer surface. Then drag a &lt;span style="font-weight:bold;"&gt;"Filtered TextBox Extender"&lt;/span&gt; Control on to the surface.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;NOTE:&lt;/span&gt; To use filtered textbox editor you need asp.et ajax and the control toolkit installed (more info at http://asp.net/ajax and http://asp.net/ajax/ajaxcontroltoolkit/ To use ajax you would also need script manager to be on the page, you will find this in the ajax tab in the toolbox of visual studio once asp.net ajax is installed).&lt;br /&gt;&lt;br /&gt;Now set the "targetcontrolID" property of the textbox extender control to the ID of the textbox ("TextBox1" in this case) and the "FilterType" property to "Numbers".&lt;br /&gt;&lt;br /&gt;Thats it! Now your Text Box will accept only numbers and alphabets are not accepted anymore by the textbox. The asp code for this is given below:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="form1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ScriptManager1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:FilteredTextBoxExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="FilteredTextBoxExtender1"&lt;/span&gt; &lt;br /&gt;     &lt;span class="attr"&gt;FilterType&lt;/span&gt;&lt;span class="kwrd"&gt;="Numbers"&lt;/span&gt; &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="TextBox1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;cc1:FilteredTextBoxExtender&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="TextBox1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-2098503964009289025?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/2098503964009289025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=2098503964009289025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/2098503964009289025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/2098503964009289025'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/02/numeric-text-box.html' title='Numeric Text Box'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-8854121833459537552</id><published>2008-02-26T02:09:00.000-08:00</published><updated>2008-12-11T22:45:28.034-08:00</updated><title type='text'>File Upload Control</title><content type='html'>File upload control allows your users to upload files to the web application using a web browser. Exercise caution in granting anyone to upload files. You may want to use the asp.net 2.0 membership features to restrict access only to specific users.&lt;br /&gt;&lt;br /&gt;Open a new website in visual studio and drag and drop the upload control on to the designer surface. As you can see the file upload has 2 parts, the text box and a browse button.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NJYCo16xsXg/R8P5TwsBFxI/AAAAAAAAAAc/n_hmlOhnLV0/s1600-h/uploadControl.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_NJYCo16xsXg/R8P5TwsBFxI/AAAAAAAAAAc/n_hmlOhnLV0/s320/uploadControl.jpg" alt="" id="BLOGGER_PHOTO_ID_5171250915033814802" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You can already test the control to see that clicking the browse button opens up the select file dialog where you can browse through the files in your hard drive and select the particular file you want to upload. What we need to do now is add a new button on to the designer surface (call it "bttnUpload"). And in the OnClick event of the upload button we will write on how to save the data into a folder on our server. Remember to create a folder by name "Uploads" in the root where we are going to upload the files. So the aspx code finally looks like&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:FileUpload&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="FileUpload1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:Button&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnUpload"&lt;/span&gt; &lt;span class="attr"&gt;OnClick&lt;/span&gt;&lt;span class="kwrd"&gt;="bttnUpload_Click"&lt;/span&gt; &lt;br /&gt;            &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;Text&lt;/span&gt;&lt;span class="kwrd"&gt;="Upload"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;In the code behind for the "bttnUpload" button click we will write the following code&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;protected void bttnUpload_Click(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (FileUpload1.HasFile)&lt;br /&gt;        {&lt;br /&gt;            string fileName = Path.Combine(Server.MapPath("~/Uploads"),FileUpload1.FileName);&lt;br /&gt;            if (File.Exists(fileName))&lt;br /&gt;                File.Delete(fileName);&lt;br /&gt;            FileUpload1.SaveAs(fileName);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What we are essentially  doing in the above code is checking to see if a file is selected to be uploaded (HasFile property). We then upload and save the file in the specified directory (using the saveas method).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-8854121833459537552?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/8854121833459537552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=8854121833459537552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/8854121833459537552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/8854121833459537552'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/02/file-upload-control.html' title='File Upload Control'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NJYCo16xsXg/R8P5TwsBFxI/AAAAAAAAAAc/n_hmlOhnLV0/s72-c/uploadControl.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-130332343539681531.post-8980540852017285189</id><published>2008-02-25T09:46:00.000-08:00</published><updated>2008-02-26T02:06:52.058-08:00</updated><title type='text'>Using the Session Object</title><content type='html'>Session is the time period during which a user interacts with a particular web application / webpage. Session object is an object which maintains this information specific to the particular visitor, internally. A session and hence the information that it carries can end deliberately through the code or on a timeout. Some of the alternatives using session object is the use of query string and hidden fields. However if you need to do complex manipulation of state data then the Session object is the way to go.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Initiating a Session&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;string uname = "Firstname Lastname";&lt;br /&gt;Session.Add("userName",uname);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above line of code stores the value of uname in a session variable called userName. Now this session variable is carried automatically across pages on the website and hence can accessed anywhere you need.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Accessing the Session object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lets say you need to place this userName in some page where the string uname is not accessible anymore (thats the reason we created the session object in this case!)&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;Label  mylabel = new Label();&lt;br /&gt;mylabel.text =  (string)Session["userName"];&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As can be noted the session object is cast as a string  else the left hand side would be a string and the right hand side would be an object and hence you would get the error&lt;br /&gt;"&lt;span class="smallblack"&gt;you can't assign an &lt;span style="font-family:monospace;"&gt;Object&lt;/span&gt; to a &lt;tt&gt;String&lt;/tt&gt;&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Modifying the Session variable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Suppose at some point of time you need to put a different value into a session variable. This can be done in the following way.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;&lt;br /&gt;Session["userName"] = "My New value here";&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lifetime of a Session&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The timeout period of a session object can be found by using&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;Session.Timeout.ToString();&lt;/pre&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The default value for this is usually 20 minutes which can be changed depending on the needs of the particular application.&lt;br /&gt;&lt;pre name="code" class="c#"&gt;Session.Timeout = 30&lt;/pre&gt;&lt;br /&gt;will make change it to 30 minutes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Deleting a Session variable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="c#"&gt;Session.Remove("userName");&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Session variables are a convenient way of storing and accessing data over multiple pages. However, very huge data should not be stored in session variables as it causes load on the server resources.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/130332343539681531-8980540852017285189?l=digdotnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://digdotnet.blogspot.com/feeds/8980540852017285189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=130332343539681531&amp;postID=8980540852017285189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/8980540852017285189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/130332343539681531/posts/default/8980540852017285189'/><link rel='alternate' type='text/html' href='http://digdotnet.blogspot.com/2008/02/using-session-object.html' title='Using the Session Object'/><author><name>Prasad Gurla</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
