<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://dineshpriyankara.spaces.live.com/mmm2008-05-17_13.22/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fdineshpriyankara.spaces.live.com%2fcategory%2fASP__x1NET%2b2__x10%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Dinesh's Blog             ::::::: Being Compiled :::::::: ASP.NET 2.0</title><description /><link>http://dineshpriyankara.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&amp;_c=BlogPart&amp;partqs=catASP__x1NET%2b2__x10</link><language>en-US</language><pubDate>Thu, 26 Jun 2008 19:40:52 GMT</pubDate><lastBuildDate>Thu, 26 Jun 2008 19:40:52 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://dineshpriyankara.spaces.live.com/blog/feed.rss</cf:parentRSS><live:type>blogcategory</live:type><live:identity><live:id>4683496953178731031</live:id><live:alias>dineshpriyankara</live:alias></live:identity><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>What should be my “Cookieless” value?</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!595.entry</link><description>&lt;font size=1&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;This is not a new issue, not a big issue but some stubborn customers of one my friends have put him into trouble. This is the case. What would happen to your session variables if customer has disabled the “cookie” in his browser? Since the default &lt;span style="font-weight:bold"&gt;“Cookieless” &lt;/span&gt;mode is &lt;span style="font-weight:bold;font-style:italic"&gt;“UseCookies” &lt;/span&gt;(see the web.config file), new session id is created for every request. Because of that, the session variables set are not available for second request as new session id is created. There is no direct way to check whether the cookies are disabled unless checking it by storing some cookie and retrieving them. Though users are warned, some are not in position to enable cookie for various reasons (one common reason is, lack of knowledge).&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;So, what is the solution? When he asked from me, I told him that another way to do it, without using cookie to hold the session id, send it through URL, not manually, but setting it in web.config file; set &lt;span style="font-weight:bold"&gt;“Cookieless” &lt;/span&gt;mode to &lt;span style="font-style:italic;font-weight:bold"&gt;“UseUri”&lt;/span&gt;&lt;span style="font-weight:bold"&gt;. &lt;/span&gt;This works fine until you try to redirect user from one page to another page by using Response.Redirect. Remember, it inserts the session id for URL if it is a relative link but an absolute link.&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;What is the next solution? Making &lt;span style="font-weight:bold"&gt;“Cookieless” &lt;/span&gt;mode to &lt;span style="font-weight:bold;font-style:italic"&gt;“AutoDetect”&lt;/span&gt;? I am not sure. I think it won’t create a solution because it a combination of above two settings. Best option is, if cookies are disable, warn customers and force them to enable it. But, , what is your opinion?&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;/font&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+What+should+be+my+%e2%80%9cCookieless%e2%80%9d+value%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!595.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!595.entry</guid><pubDate>Mon, 24 Jul 2006 01:13:20 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!595/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!595.entry#comment</wfw:comment><dcterms:modified>2006-07-24T01:13:20Z</dcterms:modified></item><item><title>Chunk your view state</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!594.entry</link><description>&lt;font size=1&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;This might not be a new for you but I found that few ASP.Net developers still do not about this. As you all know, some proxies and firewalls refuse to let pages through if pages have hidden values greater than a certain size. This limitation might prevent your page seeing to the client if the page contains a view state that size is greater than the limitation. Since ASP.Net 2.0 allows you to chunk the view state, you can simply address this type of problems if exist.&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;All you have to do is, add &lt;span style="font-weight:bold"&gt;“maxPageStateFieldLength” &lt;/span&gt;attribute to the page element with byte size value.&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;system.web&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif;color:rgb(0, 0, 255)"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;pages &lt;/span&gt;&lt;span style="color:rgb(255, 0, 0)"&gt;maxPageStateFieldLength&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:rgb(0, 0, 255)"&gt;50&lt;/span&gt;&amp;quot;&lt;span style="color:rgb(0, 0, 255)"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size=1&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:rgb(128, 0, 0)"&gt;/system.web&lt;/span&gt;&lt;span style="color:rgb(0, 0, 255)"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size=1&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;span style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;Once set, if the view state value is greater than the size set, several hidden fields will be created.&lt;/span&gt;&lt;br style="font-family:Verdana,Geneva,Arial,Sans-serif"&gt;&lt;/font&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Chunk+your+view+state&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!594.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!594.entry</guid><pubDate>Thu, 13 Jul 2006 01:28:00 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!594/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!594.entry#comment</wfw:comment><dcterms:modified>2006-07-13T01:28:00Z</dcterms:modified></item><item><title>Why my XML file for AdRotator not so smart?</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!443.entry</link><description>&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;I just tried to add an xml file and made it as the source for &lt;strong&gt;AdRotator&lt;/strong&gt; control but I found very strange thing with 2.0. I added a XML file an added the schema of AdRotator-Schedule_File. Strange, it didn’t add the Advertisement tag immediately but was available after little navigation between pages. Though it allows adding &lt;strong&gt;Ad &lt;/strong&gt;element to the page, other tags such are &lt;strong&gt;ImageURL&lt;/strong&gt;, &lt;strong&gt;Impression &lt;/strong&gt;are not available. Why is that? Am I missing something. I had to add them manually, and then it worked fine. But what was &lt;span style=""&gt; &lt;/span&gt;the problem?&lt;/font&gt;
&lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt; 
&lt;div&gt;&lt;span style="font-size:12pt;font-family:'Times New Roman'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;If you have done this without problem, appreciate if you share it with me.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:12pt;font-family:'Times New Roman'"&gt;&lt;/span&gt; &lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Why+my+XML+file+for+AdRotator+not+so+smart%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!443.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!443.entry</guid><pubDate>Tue, 21 Mar 2006 01:14:16 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!443/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!443.entry#comment</wfw:comment><dcterms:modified>2006-03-21T01:14:16Z</dcterms:modified></item><item><title>Client still can’t scroll the disabled list box</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!414.entry</link><description>&lt;div&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;One of the problems we had with ListBox in ASP.Net 1.1 is, it does not support scrolling while it is disabled. There are few workarounds for this like implementing client-side script, placing the ListBox inside the div. Yesterday I heard that now it is possible with 2.0. Guess what? It disappointed me. Still it is impossible though new properties such as “enable” for individual items.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;First I thought that enabling the ListBox and disabling all the items in the box will produce the result I want but it shows nothing. If I enable couple of items in the box, they are shown but others. This is what I did.&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#008000"&gt;//deselect and disable all&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#0000ff"&gt;for &lt;/font&gt;(&lt;font color="#0000ff"&gt;int &lt;/font&gt;x = 0; x &amp;lt; ListBox1.Items.Count; x++)&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;{&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;   ListBox1.Items[x].Selected = &lt;font color="#0000ff"&gt;false&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;   ListBox1.Items[x].Enabled = &lt;font color="#0000ff"&gt;false&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;}&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#008000"&gt;//Enable and select items I want&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#008000"&gt;//Expect to see all items in disable mode with selected ones&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#008000"&gt;//It shows only the enabled one&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ListBox1.Items[0].Selected = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ListBox1.Items[0].Enabled = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ListBox1.Items[4].Selected = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ListBox1.Items[3].Enabled = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/font&gt;&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;ListBox1.Enabled = &lt;font color="#0000ff"&gt;false&lt;/font&gt;;&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;span style="font-size:12pt;font-family:'Times New Roman'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Do you think that it is possible?&lt;span style=""&gt;  &lt;/span&gt;If so, let me know please. Note that I do not want workarounds like mentioned above.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Client+still+can%e2%80%99t+scroll+the+disabled+list+box&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!414.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!414.entry</guid><pubDate>Tue, 10 Jan 2006 01:09:40 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!414/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!414.entry#comment</wfw:comment><dcterms:modified>2006-01-10T01:09:40Z</dcterms:modified></item><item><title>Make a use of Themes</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!268.entry</link><description>&lt;div&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;I feel that the Theme facility in the asp.net 2.0 is something like &amp;quot;style sheet manager&amp;quot;? That’s how I thought. Actually this allows having separate style sheets, on controls and setting them dynamically. The setting can be set for application level, page level, container level and control level. I just tested this facility with following way.&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;/font&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Created a folder called &amp;quot;Theme&amp;quot; in the application.&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Add a style sheet that has background color set to red.&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Add a skin file (named as &amp;quot;Buttuns.skin&amp;quot;) that has following line included&lt;/font&gt;&lt;font color="#0000ff"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&amp;lt;&lt;/font&gt;&lt;/ul&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;font color="#7f0000"&gt;asp&lt;/font&gt;&lt;font color="#0000ff"&gt;:&lt;/font&gt;&lt;font color="#7f0000"&gt;Button&lt;/font&gt; &lt;font color="#ff0000"&gt;runat&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;BackColor&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;Black&amp;quot;&lt;/font&gt;&lt;font color="#ff0000"&gt;ForeColor&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/font&gt; &lt;font color="#0000ff"&gt;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/ul&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Add two buttons for the default page and set the property of &amp;quot;EnableTheming&amp;quot; to &amp;quot;false&amp;quot; for one of the buttons&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Add Theme=&amp;quot;Theme&amp;quot; page directive to the page.&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;This will add the theme to the entire page but the one of buttons that &amp;quot;false&amp;quot; for &amp;quot;EnableTheming&amp;quot; property. Is this really cool? My involvement for graphical interface designing is very rare but feel that this will be really helpful for interface designers.&lt;/font&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Make+a+use+of+Themes&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!268.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!268.entry</guid><pubDate>Thu, 01 Sep 2005 01:35:41 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!268/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!268.entry#comment</wfw:comment><dcterms:modified>2005-09-01T01:35:41Z</dcterms:modified></item><item><title>Auto code implement @ inheritance: Not working?</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!240.entry</link><description>&lt;div&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;At the time I stepped into .net 1.1 from 1.0, one of changes I saw was code auto implanting at inheritance. For example, if the class “EmployeeCollection” is needed to be derived from “CollectionBase”, simply, we extend it by adding a “:” and typing the derived class. Once the word “CollectionBase” typed, a message appears and ask us to press tab to implement all methods to be written under “CollectionBase” class. Now, is it available in 2.0?&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;I found this just now and feel that a small problem exist with 2.0. When try to create a class by inheriting “CollectionBase” with same fashion, once the word “CollectionBase” is written, a small indicator is appeared under first letter of the derived class. When the indicator is clicked (either by mouse or {Shift+Alt+F10}), a menu that contains items related to the derived class is appeared that allows us create code for “CollectionBase” automatically. &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;The problem I faced is, though the menu item is clicked, it will not create methods. Then I tested the same with some interfaces, and it worked fine. &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;As still I am beginner for .net 2.0, I think the logic behind is unknown to me. Can I have advice on this from u experts?&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;&lt;/div&gt;
&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Auto+code+implement+%40+inheritance%3a+Not+working%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!240.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!240.entry</guid><pubDate>Tue, 05 Jul 2005 01:54:01 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!240/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!240.entry#comment</wfw:comment><dcterms:modified>2005-07-05T04:12:23Z</dcterms:modified></item><item><title>Validation Group</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!239.entry</link><description>&lt;div&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;By implementing &lt;strong&gt;&lt;font color="#ff6600"&gt;ValidationGroup &lt;/font&gt;&lt;/strong&gt;for ASP.Net controls, VS team has done a wonderful job. This allows us to have a web page with separate section and validate them separately at submit. For example, assume that we have a login page (of course, you do not need to worry about creating login page now) that has two login panes, one for customers and one for administrators that will use emails and login id respectively. By setting like below, we can easily validate the section we need.&lt;/font&gt;
&lt;p style=""&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;/font&gt; 
&lt;p style=""&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt; 
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorCustomerEmail.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Customer&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorCustomerEmail.ControlToValidate = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;TextBoxCustomerEmail&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorCustomerPassword.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Customer&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorCustomerPassword.ControlToValidate = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;TextBoxCustomerPassword&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ButtonCutomerLogin.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Customer&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorAdminLoginId.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Admin&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorAdminLoginId.ControlToValidate = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;TextBoxAdminLoginId&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorAdminPassword.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Admin&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;RequiredFieldValidatorAdminPassword.ControlToValidate = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;TextBoxAdminPassword&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;ButtonAdminLogIn.ValidationGroup = &lt;span style="color:maroon"&gt;&lt;font color="#800000"&gt;&amp;quot;Admin&amp;quot;&lt;/font&gt;&lt;/span&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; 
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;&lt;font size=1&gt;If no ValidationGroup is specified, it will behave just as 1.1.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p style=""&gt;&lt;span style="font-size:10pt;font-family:'Courier New'"&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+Validation+Group&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!239.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!239.entry</guid><pubDate>Mon, 04 Jul 2005 02:05:10 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!239/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!239.entry#comment</wfw:comment><dcterms:modified>2005-07-04T02:05:10Z</dcterms:modified></item><item><title>PostBackURL Property of ASP.NET 2.0</title><link>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!215.entry</link><description>&lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;If I need to re-direct the user from one page to another page when submit, with ASP.NET 1.1, always used &amp;quot;Response.Redirect&amp;quot; in button click event. The re-direction can be done at client side if no processes need to be executed at server side. But in most cases, we need to process something (usually what user entered) before re-directing. One of the new properties come with version 2.0 is &amp;quot;&lt;strong&gt;&lt;font color="#990000"&gt;PostBackURL&lt;/font&gt;&lt;/strong&gt;&amp;quot; that supports us to do the same thing easily with some advantages.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;By setting &amp;quot;PostBackURL&amp;quot; of the submit button to the page we need, the page can be easily re-directed.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;font color="#339900"&gt;//page load of &amp;quot;Default.aspx&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;protected void&lt;/font&gt; Page_Load(&lt;font color="#0000ff"&gt;object &lt;/font&gt;sender, &lt;font color="#6666cc"&gt;EventArgs &lt;/font&gt;e)&lt;br&gt;{&lt;br&gt;&lt;font color="#0000ff"&gt;   if &lt;/font&gt;(!IsPostBack)&lt;br&gt;   {&lt;br&gt;      Button1.PostBackUrl = &amp;quot;&lt;font color="#660000"&gt;Default2.aspx&lt;/font&gt;&amp;quot;;&lt;br&gt;   }&lt;br&gt;}&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Once we set like above, user will be redirected to the page (Default2.aspx) when submit the default page by clicking the Button1. The advantage of this is, we can easily access the the controls in Source Page (Default.aspx) from Target Page (Default2.aspx) by using &amp;quot;&lt;strong&gt;&lt;font color="#660000"&gt;PreviousPage&lt;/font&gt;&lt;/strong&gt;&amp;quot; property of target page.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;//code in the Default2.aspx&lt;br&gt;&lt;font color="#0000ff"&gt;if &lt;/font&gt;(PreviousPage != &lt;font color="#0000ff"&gt;null&lt;/font&gt;)&lt;br&gt;   {&lt;br&gt;&lt;font color="#009900"&gt;&lt;font color="#000000"&gt;   &lt;/font&gt;//looking for TextBox1 of Default.aspx page text&lt;/font&gt;&lt;br&gt;&lt;font color="#6666cc"&gt;&lt;font color="#000000"&gt;   &lt;/font&gt;TextBox &lt;/font&gt;textBox = (&lt;font color="#6666cc"&gt;TextBox&lt;/font&gt;)PreviousPage.FindControl(&amp;quot;&lt;font color="#660000"&gt;TextBox1&lt;/font&gt;&amp;quot;);&lt;br&gt;   Response.Write(textBox.Text);&lt;br&gt;   }&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Can I access all public properties declared in Default.aspx through Default2.aspx? Yes, this can be done. The 2.0 allows to add an new page directive that is called &lt;strong&gt;&lt;font color="#660000"&gt;PreviousPageType&lt;/font&gt;&lt;/strong&gt;. Once this is set to (this page directive contains an attribute called VirtualPath that is used set the &amp;quot;SourcePage&amp;quot;.) the page that we expect to use as source page, all public properties declared in source page can be accessed through target page.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;font color="#339900"&gt;//property declared in Default.aspx&lt;br&gt;&lt;/font&gt;&lt;font color="#0000ff"&gt;public string&lt;/font&gt; TestProperty { &lt;font color="#0000ff"&gt;get &lt;/font&gt;{ &lt;font color="#0000ff"&gt;return &lt;/font&gt;&amp;quot;&lt;font color="#660000"&gt;This is the value of TestProperty of Default.aspx&lt;/font&gt;&amp;quot;;} }&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;if page directive is set in Default2.aspx by pointing &amp;quot;Default.aspx&amp;quot; as source&lt;/font&gt; &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&amp;lt;%&lt;font color="#0000ff"&gt;@&lt;/font&gt; &lt;font color="#660000"&gt;PreviousPageType &lt;/font&gt;&lt;font color="#ff0000"&gt;VirtualPath&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;~/Default.aspx&amp;quot;&lt;/font&gt; %&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;And the Default.aspx is redirected to the Target (Default2.aspx), the property can be accessed at Default2.aspx by;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;br&gt;PreviousPage.TestProperty&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;One thing I noticed is, when the redirection occurs, the source page &amp;quot;Page_Load&amp;quot; and &amp;quot;Button Click&amp;quot; events are ONLY fired when &amp;quot;PreviousPage&amp;quot; property is accessed. If the target page is not accessed the source page by using &amp;quot;PreviousPage&amp;quot; property, the above events in source page are not fired. I am not quite sure why this type of behavior is set. I accidentally came across this behavior when I try access a Session variable that set in Button_Click at source page. If the &amp;quot;PreviuosPage&amp;quot; is not accessed in target page, session variable contains the default value but contains new value if the property is called.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Here is a test code in source page&lt;br&gt;&lt;font color="#0000ff"&gt;protected &lt;/font&gt;&lt;font color="#0000ff"&gt;void &lt;/font&gt;Page_Load(&lt;font color="#0000ff"&gt;object &lt;/font&gt;sender, &lt;font color="#6666cc"&gt;EventArgs &lt;/font&gt;e)&lt;br&gt;{&lt;br&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;   &lt;/font&gt;if &lt;/font&gt;(!IsPostBack)&lt;br&gt;   {&lt;br&gt;      Session[&lt;font color="#660000"&gt;&amp;quot;TestSessionValue&amp;quot;&lt;/font&gt;] = &lt;font color="#660000"&gt;&amp;quot;This is default value&amp;quot;&lt;/font&gt;;&lt;br&gt;      Button1.PostBackUrl = &lt;font color="#660000"&gt;&amp;quot;Default2.aspx&amp;quot;&lt;/font&gt;;&lt;br&gt;   }&lt;br&gt;}&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Button click event in the source page&lt;br&gt;&lt;font color="#0000ff"&gt;protected &lt;/font&gt;&lt;font color="#0000ff"&gt;void &lt;/font&gt;Button1_Click(&lt;font color="#0000ff"&gt;object &lt;/font&gt;sender, &lt;font color="#6666cc"&gt;EventArgs &lt;/font&gt;e)&lt;br&gt;{&lt;br&gt;   Session[&lt;font color="#660000"&gt;&amp;quot;TestSessionValue&amp;quot;&lt;/font&gt;] = &lt;font color="#660000"&gt;&amp;quot;Value is set by Default.aspx.Button1.Click event&amp;quot;&lt;/font&gt;;&lt;br&gt;}&lt;/font&gt; &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Code in the target page&lt;br&gt;&lt;font color="#0000ff"&gt;protected void &lt;/font&gt;Page_Load(&lt;font color="#0000ff"&gt;object &lt;/font&gt;sender, &lt;font color="#6666ff"&gt;EventArgs &lt;/font&gt;e)&lt;br&gt;{&lt;br&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;   &lt;/font&gt;if &lt;/font&gt;(!IsPostBack)&lt;br&gt;   {&lt;br&gt;      Response.Write(Session[&lt;font color="#660000"&gt;&amp;quot;TestSessionValue&amp;quot;&lt;/font&gt;].ToString());&lt;br&gt;      Response.Write(&lt;font color="#660000"&gt;&amp;quot;&amp;lt;br&amp;gt;&amp;quot;&lt;/font&gt;);&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;      &lt;/font&gt;if &lt;/font&gt;(PreviousPage != &lt;font color="#0000ff"&gt;null&lt;/font&gt;)&lt;br&gt;      {&lt;br&gt;         Response.Write(Session[&lt;font color="#660000"&gt;&amp;quot;TestSessionValue&amp;quot;&lt;/font&gt;].ToString());&lt;br&gt;      }&lt;br&gt;   }&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;}&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;&lt;strong&gt;&lt;em&gt;The output will be;&lt;br&gt;&lt;/em&gt;&lt;/strong&gt;This is default value&lt;br&gt;Value is set by Default.aspx.Button1.Click event&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt;  &lt;p&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif" size=1&gt;Anyway, this is really helpful. I just started exploring the 2.0 and lot to dig up.&lt;/font&gt; &lt;p&gt;&lt;font face=Verdana size=1&gt;&lt;/font&gt; &lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4683496953178731031&amp;page=RSS%3a+PostBackURL+Property+of+ASP.NET+2.0&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=dineshpriyankara.spaces.live.com&amp;amp;GT1=dineshpriyankara"&gt;</description><comments>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!215.entry#comment</comments><guid isPermaLink="true">http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!215.entry</guid><pubDate>Tue, 07 Jun 2005 01:44:37 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://dineshpriyankara.spaces.live.com/blog/cns!40FF1FAA28D7B217!215/comments/feed.rss</wfw:commentRss><wfw:comment>http://dineshpriyankara.spaces.live.com/Blog/cns!40FF1FAA28D7B217!215.entry#comment</wfw:comment><dcterms:modified>2005-06-07T01:44:37Z</dcterms:modified></item></channel></rss>