<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://barmagy.com/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Geek word of the week</title><link>http://barmagy.com/blogs/mina_shawky/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Debug Build: 60217.2664)</generator><item><title>Silverlight 2 released</title><link>http://barmagy.com/blogs/mina_shawky/archive/2008/10/14/3170.aspx</link><pubDate>Tue, 14 Oct 2008 06:37:00 GMT</pubDate><guid isPermaLink="false">6f955cd0-92ea-460f-9cfe-3201e711ce4e:3170</guid><dc:creator>mina.shawky</dc:creator><slash:comments>0</slash:comments><comments>http://barmagy.com/blogs/mina_shawky/comments/3170.aspx</comments><wfw:commentRss>http://barmagy.com/blogs/mina_shawky/commentrss.aspx?PostID=3170</wfw:commentRss><description>&lt;P&gt;Check it out&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx"&gt;ScottGu blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://silverlight.net/GetStarted/"&gt;Silverlight site&lt;/A&gt;&lt;/P&gt;&lt;img src="http://barmagy.com/aggbug.aspx?PostID=3170" width="1" height="1"&gt;</description></item><item><title>Microsoft &amp;amp; jQuery join forces!!!</title><link>http://barmagy.com/blogs/mina_shawky/archive/2008/09/29/3110.aspx</link><pubDate>Mon, 29 Sep 2008 04:42:00 GMT</pubDate><guid isPermaLink="false">6f955cd0-92ea-460f-9cfe-3201e711ce4e:3110</guid><dc:creator>mina.shawky</dc:creator><slash:comments>0</slash:comments><comments>http://barmagy.com/blogs/mina_shawky/comments/3110.aspx</comments><wfw:commentRss>http://barmagy.com/blogs/mina_shawky/commentrss.aspx?PostID=3110</wfw:commentRss><description>&lt;DIV&gt;This announcement was posted last Sunday on ScottGu's blog&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;stating that in the upcoming weeks Microsoft VS will fully support jQuery. The library will be downloaded by default with all web projects and VS will provide intellisense and help support to the jQuery coding activities... This is great :)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;For more about jQuery and the Microsoft deal please check&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/"&gt;http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx"&gt;http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://docs.jquery.com/Main_Page"&gt;http://docs.jquery.com/Main_Page&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://jquery.com/"&gt;http://jquery.com/&lt;/A&gt;&lt;/DIV&gt;&lt;img src="http://barmagy.com/aggbug.aspx?PostID=3110" width="1" height="1"&gt;</description></item><item><title>ASP.NET AJAX Script Combination</title><link>http://barmagy.com/blogs/mina_shawky/archive/2008/05/13/1375.aspx</link><pubDate>Tue, 13 May 2008 02:34:00 GMT</pubDate><guid isPermaLink="false">6f955cd0-92ea-460f-9cfe-3201e711ce4e:1375</guid><dc:creator>mina.shawky</dc:creator><slash:comments>0</slash:comments><comments>http://barmagy.com/blogs/mina_shawky/comments/1375.aspx</comments><wfw:commentRss>http://barmagy.com/blogs/mina_shawky/commentrss.aspx?PostID=1375</wfw:commentRss><description>&lt;P&gt;Several enhancements have been added to ASP.NET with the release of Beta versions of Visual Studio 2008 SP1 and .NET 3.5 SP1...&lt;/P&gt;
&lt;P&gt;One of the good enhancements has to be the Script Combination ability&amp;nbsp;where you will be able to select the number of scripts you need to in your page to AJAX enable it and improve the performance of it...&lt;/P&gt;
&lt;P&gt;Check out this video at &lt;A href="http://www.asp.net"&gt;www.asp.net&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.asp.net/learn/3.5-extensions-videos/video-296.aspx"&gt;http://www.asp.net/learn/3.5-extensions-videos/video-296.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://barmagy.com/aggbug.aspx?PostID=1375" width="1" height="1"&gt;</description></item><item><title>ASP.NET 3.5 Extensions Preview - AJAX History Management</title><link>http://barmagy.com/blogs/mina_shawky/archive/2008/04/10/1235.aspx</link><pubDate>Thu, 10 Apr 2008 11:38:00 GMT</pubDate><guid isPermaLink="false">6f955cd0-92ea-460f-9cfe-3201e711ce4e:1235</guid><dc:creator>mina.shawky</dc:creator><slash:comments>2</slash:comments><comments>http://barmagy.com/blogs/mina_shawky/comments/1235.aspx</comments><wfw:commentRss>http://barmagy.com/blogs/mina_shawky/commentrss.aspx?PostID=1235</wfw:commentRss><description>&lt;H2&gt;Introduction&lt;/H2&gt;
&lt;P&gt;ASP.NET 3.5 Extensions Preview is now gaining more attention and a lot of articles are being submitted in order to discuss different enhancements and new additions to the ASP.NET API. One of the very good enhancements has to be with the ASP.NET AJAX and the ability to manage and record the history of AJAX events into the browser's history log.&lt;/P&gt;
&lt;P&gt;You can check more on the ASP.NET 3.5 Extensions preview and all the new stuff here &lt;A href="http://quickstarts.asp.net/3-5-extensions/"&gt;http://quickstarts.asp.net/3-5-extensions/&lt;/A&gt; and here &lt;A href="http://www.asp.net/downloads/3.5-extensions/"&gt;http://www.asp.net/downloads/3.5-extensions/&lt;/A&gt;&lt;/P&gt;
&lt;H2&gt;Background&lt;/H2&gt;
&lt;P&gt;Before the Extensions, developers spent tremendous amount of time to enable the browser to log the history of AJAX events, and to navigate these events using the browser's own back and forward button, and most probably failed to deliver this requirement.&lt;/P&gt;
&lt;P&gt;But now, with the extensions, you can implement this functionality with a very few lines of code. This article will show you how.&lt;/P&gt;
&lt;H2&gt;ASP.NET 3.5 Extensions Preview&lt;/H2&gt;
&lt;P&gt;First of all you need to download the ASP.NET 3.5 Extensions Preview on you machine from here &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A9C6BC06-B894-4B11-8300-35BD2F8FC908&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=A9C6BC06-B894-4B11-8300-35BD2F8FC908&amp;amp;displaylang=en&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After you successfully install the extensions, you will find many new project templates and controls added to you Visual Studio 2008 IDE...&lt;/P&gt;
&lt;H2&gt;Managing AJAX History&lt;/H2&gt;
&lt;P&gt;Start by opening your Visual Studio 2008 instance and create a new ASP.NET 3.5 Extensions website.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=232 alt="ASP.NET 3.5 Extensions new project templates" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/Website_type.JPG" width=600 align=baseline border=0&gt;&lt;/P&gt;
&lt;P&gt;Notice the range of new controls that are added with the extensions, but for the scope of the article we will not use any of them.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=433 alt="New controls Toolbar" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/Toolbar.JPG" width=235 align=baseline border=0&gt;&lt;/P&gt;
&lt;P&gt;Start by adding a label and a button and call them "lblValue" and "btnIncrement" respectively.&lt;/P&gt;
&lt;P&gt;Double click the button to handle the Click event. Copy and paste this code below&lt;/P&gt;
&lt;DIV class=no-vmads&gt;&lt;PRE&gt;&lt;SPAN class=code-keyword&gt;protected&lt;/SPAN&gt; &lt;SPAN class=code-keyword&gt;void&lt;/SPAN&gt; btnIncrement_Click(&lt;SPAN class=code-keyword&gt;object&lt;/SPAN&gt; sender, EventArgs e)
{
    lblValue.Text = &lt;SPAN class=code-keyword&gt;string&lt;/SPAN&gt;.IsNullOrEmpty(lblValue.Text) ? &lt;SPAN class=code-string&gt;"&lt;/SPAN&gt;&lt;SPAN class=code-string&gt;0"&lt;/SPAN&gt;: (Convert.ToInt32(lblValue.Text) + &lt;SPAN class=code-digit&gt;1&lt;/SPAN&gt;).ToString();
}
        &lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Basically when you run the web site and click the "Increment" button, the value of the label will be incremented. But I need you to notice something on the browser&lt;/P&gt;
&lt;P&gt;
&lt;TABLE cellSpacing=1 cellPadding=1&gt;

&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;Before you click Increment&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;After you click Increment&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;IMG height=325 alt="Postback - Before click" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/PostBack_Before.JPG" width=180 align=baseline border=0&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;IMG height=325 alt="Postback - After click" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/PostBack_After.JPG" width=185 align=baseline border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;Notice that when you click on the Increment button, the browser will keep track of you event, and whenever you click the browser's Back button, you will return to the previous state... Also notice that whenever you click the Increment button, the whole page will post back (which is not a good thing in terms of usability)&lt;/P&gt;
&lt;P&gt;So, to make the page more usable, you should add an Update Panel and insert both the label and the button inside the panel like this.&lt;/P&gt;
&lt;DIV class=no-vmads&gt;&lt;PRE&gt;&lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;form&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;id&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;form1"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:ScriptManager&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;ID&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;ScriptManager1"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt; &lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
   &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;div&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:UpdatePanel&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;ID&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;UpdatePanel1"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
         &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;ContentTemplate&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;ID&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;lblValue"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;br&lt;/SPAN&gt; &lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
            &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:Button&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;ID&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;btnIncrement"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;onclick&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;btnIncrement_Click"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;Text&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;Increment"&lt;/SPAN&gt; &lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
         &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;ContentTemplate&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:UpdatePanel&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
   &lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;div&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;form&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Now, run the application and notice what happens&lt;/P&gt;
&lt;P&gt;
&lt;TABLE cellSpacing=1 cellPadding=1&gt;

&lt;TR&gt;
&lt;TD&gt;&lt;STRONG&gt;Before you click Increment&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;After you click Increment&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;IMG height=325 alt="UpdatePanel - Before" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/UpdatePanel_Before.JPG" width=185 align=baseline border=0&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;IMG height=325 alt="UpdatePanel - After" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/UpdatePanel_After.JPG" width=185 align=baseline border=0&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;The browser did not recognize what happened, as the event was fired asynchronously in the background without posting back the whole page.&lt;/P&gt;
&lt;P&gt;So how can we fix this problem?&lt;/P&gt;
&lt;P&gt;ASP.NET Extensions Preview provides us with an API for handling AJAX events and updating the browser history at the same time in two steps.&lt;/P&gt;
&lt;P&gt;Step one, we need to handle the event that changes the state of the application (in our case the button Click event) and create a history point with every new change.&lt;/P&gt;
&lt;P&gt;Step two, we need to handle the Browser navigation events, so when the user clicks the back or forward buttons the application will restore the latest history point.&lt;/P&gt;
&lt;H3&gt;Step 1&lt;/H3&gt;
&lt;P&gt;Inside the button's Click event handler we need to check this condition&lt;/P&gt;
&lt;DIV class=no-vmads&gt;&lt;PRE&gt;&lt;SPAN class=code-keyword&gt;if&lt;/SPAN&gt;(ScriptManager1.IsInAsynchPostBack &amp;amp;&amp;amp; !ScriptManager1.IsNavigating)
   ScriptManager1&lt;/PRE&gt;&lt;FONT face="Times New Roman"&gt;&lt;PRE&gt;&lt;FONT color=#000000&gt;This check is to ensure that&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT color=#000000&gt;We are in an Asynchronous Post Back &lt;/FONT&gt;&lt;LI&gt;&lt;FONT color=#000000&gt;This post back is not the result of the user clicking the browser's back or forward buttons &lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&lt;FONT&gt;The &lt;FONT face="Times New Roman"&gt;&lt;CODE&gt;AddHistoryPoint&lt;/CODE&gt; method takes three parameters (it also has 2 other overloads)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color=#000000&gt;A Key: where you can store different keys for different AJAX parts in your page (i.e., if you have another AJAX panel that you need to &lt;/FONT&gt;&lt;FONT color=#000000&gt;store the history of events for, you can use another key so that they won't overlap) &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT color=#000000&gt;The State: where you will store the value of the current history point (in our case the value of the label) &lt;/FONT&gt;
&lt;LI&gt;&lt;FONT color=#000000&gt;Title: A title that will appear in the browser's back and forward buttons &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;&lt;FONT&gt;After you add this code, go back to the .aspx page, and add the &lt;FONT face="Times New Roman"&gt;&lt;CODE&gt;EnableHistory &lt;/CODE&gt;property to your ScriptManager1 tag. Set it to &lt;CODE&gt;&lt;SPAN class=code-keyword&gt;true&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=no-vmads&gt;&lt;PRE&gt;&lt;SPAN class=code-keyword&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=code-leadattribute&gt;asp:ScriptManager&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;ID&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;ScriptManager1"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;EnableHistory&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;true"&lt;/SPAN&gt; &lt;SPAN class=code-attribute&gt;runat&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;="&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;server"&lt;/SPAN&gt; &lt;SPAN class=code-keyword&gt;/&lt;/SPAN&gt;&lt;SPAN class=code-keyword&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;H3&gt;Step 2&lt;/H3&gt;
&lt;P&gt;We need to handle the browser navigation. To do so, add a handler to the &lt;CODE&gt;Navigate &lt;/CODE&gt;event of the ScriptManager1 control.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=195 alt="Navigation event handler" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/Navigation_Event.JPG" width=600 align=baseline border=0&gt;&lt;/P&gt;
&lt;P&gt;This event is raised when the user clicks the back, or forward, button of the browser.&lt;/P&gt;
&lt;P&gt;Next thing is to get the value of the new history point state and store it to the label.&lt;/P&gt;
&lt;DIV class=no-vmads&gt;&lt;PRE&gt;&lt;SPAN class=code-keyword&gt;protected&lt;/SPAN&gt; boid ScriptManager1_Navigate(&lt;SPAN class=code-keyword&gt;object&lt;/SPAN&gt; sender, HistoryEventArgs e)
{
   lblValue.Text = e.State[&lt;SPAN class=code-string&gt;"&lt;/SPAN&gt;&lt;SPAN class=code-string&gt;index"&lt;/SPAN&gt;];
}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;
&lt;P&gt;
&lt;P&gt;Now notice the difference when you run the application&lt;/P&gt;
&lt;P&gt;&lt;IMG height=274 alt="Solution 1" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/Solution1.JPG" width=336 align=baseline border=0&gt;&lt;/P&gt;
&lt;P&gt;You can now use the browser's back and forward button in navigating with your application.&lt;/P&gt;
&lt;P&gt;&lt;IMG height=272 alt="Solution 2" hspace=0 src="http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement/Solution2.JPG" width=295 align=baseline border=0&gt;&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H2&gt;Conclusion&lt;/H2&gt;
&lt;P&gt;To wrap up this article, ASP.NET Extenstion Preview provides us with several new functionalities and &lt;/P&gt;
&lt;P&gt;enhancements and one of them is the ability for the developer to log AJAX events as history points and &lt;/P&gt;
&lt;P&gt;manage the browser's Navigation to restore these events.&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;img src="http://barmagy.com/aggbug.aspx?PostID=1235" width="1" height="1"&gt;</description><enclosure url="http://barmagy.com/blogs/mina_shawky/attachment/1235.ashx" length="4056" type="application/x-zip-compressed" /></item></channel></rss>