<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">David Barkol's blog</title><subtitle type="html" /><id>http://weblogs.asp.net/davidbarkol/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/davidbarkol/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2007-05-02T14:46:00Z</updated><entry><title>Asynchronous error handling change in ASP.NET AJAX 3.5</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2008/09/25/asynchronous-error-handling-change-in-asp-net-ajax-3-5.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2008/09/25/asynchronous-error-handling-change-in-asp-net-ajax-3-5.aspx</id><published>2008-09-25T23:19:17Z</published><updated>2008-09-25T23:19:17Z</updated><content type="html">&lt;p&gt;There is a subtle change in the .NET 3.5 release of the &lt;a href="http://msdn.microsoft.com/en-us/asp.net/bb944808.aspx" target="_blank"&gt;Microsoft Ajax Library&lt;/a&gt; that might catch some developers by surprise when handling asynchronous postback errors. The change can be found at the end of the endPostBack function of the PageRequestManager object. In the first release of the Ajax library, if an error was not handled on the client; an alert box was used to convey to the user the error message:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;ASP.NET AJAX 1.0 (MicrosoftAjaxWebForms.debug.js):&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Sys$WebForms$PageRequestManager$_endPostBack(error, response) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._processingRequest = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._request = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._additionalInput = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; handler = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._get_eventHandlerList().getHandler(&lt;span style="color: #006080"&gt;&amp;quot;endRequest&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; errorHandled = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (handler) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; eventArgs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Sys.WebForms.EndRequestEventArgs(error, &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._dataItems, response);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         handler(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, eventArgs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;         errorHandled = eventArgs.get_errorHandled();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._dataItems = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (error &amp;amp;&amp;amp; !errorHandled) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;         &lt;strong&gt;&lt;font color="#ff0000"&gt;alert(error.message);&lt;/font&gt;&lt;/strong&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div&gt;The problem with this approach is that it was too intrusive to assume that the alert box would be the ideal behavior. Instead, it makes more sense for the error to be thrown to the client so that you can have more control of the outcome. Therefore, the change in ASP.NET 3.5 is to simply throw the error if it hasn't been handled.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;ASP.NET AJAX in .NET 3.5 (MicrosoftAjaxWebForms.debug.js):&lt;/div&gt;

&lt;div&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Sys$WebForms$PageRequestManager$_endPostBack(error, response) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._request === response.get_webRequest()) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._processingRequest = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._additionalInput = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._request = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; handler = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._get_eventHandlerList().getHandler(&lt;span style="color: #006080"&gt;&amp;quot;endRequest&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; errorHandled = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (handler) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; eventArgs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Sys.WebForms.EndRequestEventArgs(error, &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._dataItems, response);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;         handler(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, eventArgs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;         errorHandled = eventArgs.get_errorHandled();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._processingRequest) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;._dataItems = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (error &amp;amp;&amp;amp; !errorHandled) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;         &lt;strong&gt;&lt;font color="#ff0000"&gt;&lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; error;&lt;/font&gt;&lt;/strong&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  20:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;So what does this mean to code you've written for ASP.NET 2.0 that has been migrated to ASP.NET 3.5? Well, if you haven't handled the endRequest client-side event after an async postback then the user is now going to experience a runtime error, whereas they would have simply experienced an alert box with the error message before:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://weblogs.asp.net/blogs/davidbarkol/RuntimeError.png" /&gt; &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Here is a simple example of how to reproduce this behavior in ASP.NET 3.5: &lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:ScriptManager&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ScriptManager1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:UpdatePanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;UpdatePanel1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;UpdateMode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Conditional&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ThrowError&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnClick&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ThrowError_OnClick&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Throw Error&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:UpdatePanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Code behind:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     ScriptManager sm = ScriptManager.GetCurrent(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Page);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     sm.AsyncPostBackError += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EventHandler&amp;lt;AsyncPostBackErrorEventArgs&amp;gt;(ScriptManager1_OnAsyncPostBackError);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     sm.AllowCustomErrorsRedirect = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ScriptManager1_OnAsyncPostBackError(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, AsyncPostBackErrorEventArgs e)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;     ScriptManager.GetCurrent(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Page).AsyncPostBackErrorMessage = &lt;span style="color: #006080"&gt;&amp;quot;Please try that again.&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ThrowError_OnClick(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span style="color: #006080"&gt;&amp;quot;Throw error!&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Lastly, here is an example of how to handle the endRequest event thrown by the PageRequestManager to avoid the runtime error:&lt;/p&gt;

&lt;div&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style="color: #006080"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; onEndRequest(sender, args) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; error = args.get_error();&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (error != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Set the error handled flag to avoid a runtime error&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// reaching the user.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  11:&lt;/span&gt;             args.set_errorHandled(&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  12:&lt;/span&gt;             &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  13:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Remove the error name from the message&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  14:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; msg = error.message.replace(&lt;span style="color: #006080"&gt;&amp;quot;Sys.WebForms.PageRequestManagerServerErrorException: &amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;);                                &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  15:&lt;/span&gt;             alert(msg);                &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  16:&lt;/span&gt;         }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  18:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  19:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In the example, the message name is removed so that the user will only view the intended postback error message set from the code-behind. But more importantly, is the ability to take control of how the error is handled with the handler for the endRequest event.&lt;/p&gt;

&lt;p&gt;For a more in-depth example of client-side events during an async postback, check out this post: &lt;a href="http://weblogs.asp.net/davidbarkol/archive/2007/03/25/asp-net-ajax-client-side-event-viewer.aspx" target="_blank"&gt;Client-side event viewer&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6641950" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="AJAX" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/AJAX/default.aspx" /></entry><entry><title>ASP.NET 3.5 Extensions History Control Tip</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/12/28/asp-net-3-5-extensions-history-control-tip.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/12/28/asp-net-3-5-extensions-history-control-tip.aspx</id><published>2007-12-29T02:06:09Z</published><updated>2007-12-29T02:06:09Z</updated><content type="html">&lt;p&gt;Originally introduced in the ASP.NET Futures package, the history control in the &lt;a href="http://www.asp.net/downloads/3.5-extensions/" target="_blank"&gt;ASP.NET 3.5 Extensions&lt;/a&gt; preview comes with a few nice additions. One of the updates is the ability to change the page title when adding a history point. This is important because without updating the title, the history list isn't very much help after a few updates. To illustrate the problem, here is what the history list in IE could look like after adding a few history points:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img alt="What happened?" src="http://weblogs.asp.net/blogs/davidbarkol/BrowserHistoryNoTitle.png" /&gt; &lt;/p&gt;  &lt;p&gt;Because all the entries are the same, the user is unable to distinguish between them, leaving the list to be pretty unhelpful.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Adding history from the server&lt;/h3&gt;  &lt;p&gt;To take advantage of this from the server, you simply include the page title for the new history entry in the AddHistoryPoint method. This will update the page title when you add a history point but it will &lt;strong&gt;NOT&lt;/strong&gt; update it for you when the user clicks the browser Back or Forward buttons. To accommodate for this, you have to set the page title as well in the Navigate event. Here is both the HTML and code-behind for this example:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;   &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:ScriptManager&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TheScriptManager&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;EnableHistory&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;
    &lt;span style="color: #ff0000"&gt;EnableStateHash&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnNavigate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TheScriptManager_Navigated&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;

&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;        

    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:UpdatePanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;UpdatePanel1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnCommand&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button_OnCommand&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CommandArgument&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;amp;nbsp;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnCommand&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button_OnCommand&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CommandArgument&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;amp;nbsp;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button3&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button3&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnCommand&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button_OnCommand&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CommandArgument&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;3&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;hr&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Label&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Label1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;            
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;        
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:UpdatePanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;    

&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Button_OnCommand(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, CommandEventArgs e)
{
    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; buttonState = e.CommandArgument.ToString();
    Label1.Text = buttonState;
    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; title = &lt;span style="color: #006080"&gt;&amp;quot;Browser History &amp;quot;&lt;/span&gt; + buttonState;
    TheScriptManager.AddHistoryPoint(&lt;span style="color: #006080"&gt;&amp;quot;buttonState&amp;quot;&lt;/span&gt;, buttonState, title);       
}

&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; TheScriptManager_Navigated(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, HistoryEventArgs e)
{
    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; buttonState = e.State[&lt;span style="color: #006080"&gt;&amp;quot;buttonState&amp;quot;&lt;/span&gt;];
    Label1.Text = buttonState;
    Title = &lt;span style="color: #006080"&gt;&amp;quot;Browser History &amp;quot;&lt;/span&gt; + buttonState;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now, the history list can be used more effectively and will look something like this:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;img alt="Meaningful history list" src="http://weblogs.asp.net/blogs/davidbarkol/BrowserHistoryWithTitle.png" /&gt; &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Adding history from the client&lt;/h3&gt;

&lt;p&gt;The same steps apply to managing history on the client: &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Pass in the page title when adding a history point to update the list and title accordingly.&lt;/li&gt;

  &lt;li&gt;Update the page title in the handler for the navigate event.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the code for the client example:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:ScriptManager&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TheScriptManager&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;EnableHistory&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;
    &lt;span style="color: #ff0000"&gt;EnableStateHash&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;

&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;    
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;input&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button_click(1);&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;amp;nbsp;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;input&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button2&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button_click(2);&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;&amp;amp;nbsp;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;input&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button3&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;button_click(3);&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;hr&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;span&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;results&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;    
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;lt;script type=&lt;span style="color: #006080"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;

    Sys.Application.add_navigate(onNavigate);
    
    &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; onNavigate(sender, args){                                                            
        &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; buttonNumber = args.get_state().pageState || &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;            
        $get(&lt;span style="color: #006080"&gt;&amp;quot;results&amp;quot;&lt;/span&gt;).innerHTML = buttonNumber;
        document.title = &lt;span style="color: #006080"&gt;&amp;quot;Browser History &amp;quot;&lt;/span&gt; +  buttonNumber;          
    }

    &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; button_click(buttonNumber){                    
        $get(&lt;span style="color: #006080"&gt;&amp;quot;results&amp;quot;&lt;/span&gt;).innerHTML = buttonNumber; 
        &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; historyPoint = { pageState : buttonNumber };
        &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; title = &lt;span style="color: #006080"&gt;&amp;quot;Browser History &amp;quot;&lt;/span&gt; + buttonNumber;           
        Sys.Application.addHistoryPoint(historyPoint, title);            
    }

&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Hope someone finds this interesting. :)&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5514689" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="AJAX" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/AJAX/default.aspx" /></entry><entry><title>SSL Support for Virtual Earth is here</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/11/23/ssl-support-for-virtual-earth-is-here.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/11/23/ssl-support-for-virtual-earth-is-here.aspx</id><published>2007-11-23T20:34:00Z</published><updated>2007-11-23T20:34:00Z</updated><content type="html">&lt;P&gt;If you've ever placed a Virtual Earth map or Google map on an HTTPS page then you're probably familiar with the mixed content message that appears when the page loads:&lt;/P&gt;
&lt;P&gt;&lt;IMG id=id src="http://weblogs.asp.net/blogs/davidbarkol/mixed.png" mce_src="http://weblogs.asp.net/blogs/davidbarkol/mixed.png"&gt; &lt;/P&gt;
&lt;P&gt;While there are workarounds for this in the browser settings, the solution isn't really scalable. The good news it that Virtual Earth 6 now offers support for SSL pages. All that we have to do is update the script reference like so:&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;script&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text/javascript"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;  &lt;SPAN class=attr&gt;src&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&amp;amp;s=1"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&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&gt;
&lt;P&gt;Notice how the source path now begins with &lt;STRONG&gt;https&lt;/STRONG&gt; and the version is set to &lt;STRONG&gt;6. &lt;/STRONG&gt;Also, there is the additional parameter at the end, &lt;STRONG&gt;s=1;&lt;/STRONG&gt; that flags the request accordingly.&lt;/P&gt;
&lt;P&gt;If you're using ASP.NET AJAX and have a ScriptManager on the page, then your reference can look something like this:&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&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;/PRE&gt;&lt;PRE&gt;  &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&amp;amp;s=1"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;  &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptManager&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;This seems like a subtle change, but both Google and Virtual Earth have lacked this type of support for years. For anyone building enterprise applications that require HTTPS, this is something we've been asking and waiting for, for quite some time. &lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5321354" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="Virtual Earth" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Virtual+Earth/default.aspx" /></entry><entry><title>ASPInsiders</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/11/19/aspinsiders.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/11/19/aspinsiders.aspx</id><published>2007-11-20T02:50:00Z</published><updated>2007-11-20T02:50:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;Recently, along with a &lt;A class="" href="http://aspadvice.com/blogs/garbin/archive/2007/11/17/I_2700_m-an-ASPInsider_2100_.aspx" mce_href="http://aspadvice.com/blogs/garbin/archive/2007/11/17/I_2700_m-an-ASPInsider_2100_.aspx"&gt;few&lt;/A&gt; &lt;A class="" href="http://msmvps.com/blogs/luisabreu/archive/2007/11/13/aspinsider.aspx" mce_href="http://msmvps.com/blogs/luisabreu/archive/2007/11/13/aspinsider.aspx"&gt;others&lt;/A&gt;, I've received the honor of joining the &lt;A class="" href="http://www.aspinsiders.com/" mce_href="http://www.aspinsiders.com"&gt;ASPInsiders&lt;/A&gt;.&amp;nbsp;It has been a true privilege being a part of such a talented and great group and I look forward to sharing and learning from them as much as possible.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" href="http://www.aspinsiders.com/" mce_href="http://www.aspinsiders.com"&gt;&lt;IMG title=ASPInsiders style="WIDTH: 238px; HEIGHT: 86px" height=86 alt=ASPInsiders src="http://weblogs.asp.net/blogs/davidbarkol/aspinsiders.gif" width=238 border=none mce_src="http://weblogs.asp.net/blogs/davidbarkol/aspinsiders.gif"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5288403" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="ASPInsiders" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASPInsiders/default.aspx" /></entry><entry><title>Great WCF Tips from David Pallmann</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/09/25/great-wcf-tips-from-david-pallmann.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/09/25/great-wcf-tips-from-david-pallmann.aspx</id><published>2007-09-26T04:36:00Z</published><updated>2007-09-26T04:36:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;The best part about working at &lt;A class="" title=Neudesic href="http://www.neudesic.com/" target=_blank mce_href="http://www.neudesic.com"&gt;Neudesic&lt;/A&gt; is the interaction you get with some of the most talented people in the industry. Recently, &lt;A class="" title="David Pallmann" href="http://davidpallmann.spaces.live.com/default.aspx" target=_blank mce_href="http://davidpallmann.spaces.live.com/default.aspx"&gt;David Pallmann&lt;/A&gt;, one of our Architect Consultants, posted an invaluable&amp;nbsp;series of blogs posts on WCF tips. Here are the links to his most recent posts:&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/Blog/cns!E95EF9DC3FDB978E!257.entry" mce_href="http://davidpallmann.spaces.live.com/Blog/cns!E95EF9DC3FDB978E!257.entry"&gt;WCF Tips #1 - Service Interface Design&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!258.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!258.entry"&gt;WCF Tips #2 - Service Class Design&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!259.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!259.entry"&gt;WCF Tips #3 - Service Hosting&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!260.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!260.entry"&gt;WCF Tips #4 - Configuration&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!261.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!261.entry"&gt;WCF Tips #5 - Infrastructure&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!262.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!262.entry"&gt;WCF Tips #6 - Instrumentation&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!263.entry" mce_href="http://davidpallmann.spaces.live.com/blog/cns!E95EF9DC3FDB978E!263.entry"&gt;WCF Tips #7 - Clients&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;To gain some real-world insight into WCF, check out&amp;nbsp;these tips&amp;nbsp;and&amp;nbsp;&lt;A class="" title=subscribe href="http://davidpallmann.spaces.live.com/feed.rss" mce_href="http://davidpallmann.spaces.live.com/feed.rss"&gt;subscribe&lt;/A&gt;&amp;nbsp;to David's blog!&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4161365" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="WCF" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/WCF/default.aspx" /></entry><entry><title>ASP.NET AJAX in Action - Finally!</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/08/14/asp-net-ajax-in-action-finally.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/08/14/asp-net-ajax-in-action-finally.aspx</id><published>2007-08-15T04:00:27Z</published><updated>2007-08-15T04:00:27Z</updated><content type="html">&lt;p&gt;After a long but rewarding journey I'm happy to announce that our book, &lt;a href="http://www.amazon.com/o/ASIN/1933988142/ref=s9_asin_image_1/103-7427764-8795861?%5Fencoding=UTF8&amp;amp;coliid=I1LHCSA7CSY03U&amp;amp;colid=2VT6R9PEVDTX8&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_s=center-6&amp;amp;pf_rd_r=0WA4QE9ZYY08ZX07MSH6&amp;amp;pf_rd_t=101&amp;amp;pf_rd_p=279439101&amp;amp;pf_rd_i=507846" target="_blank"&gt;ASP.NET AJAX In Action&lt;/a&gt;, is finally out! Currently, the book is available in eBook format from the &lt;a href="http://www.manning.com/gallo" target="_blank"&gt;Manning&lt;/a&gt; web site. On August 24th (next week), the printed book will be available as well. Source code for the book&amp;nbsp;can be freely downloaded from &lt;a href="http://www.manning.com/gallo/gallo_sourcecode.zip"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Here are the contents (copied from the Manning home page):&lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;i&gt;forewords &lt;/i&gt;&lt;br&gt;&lt;i&gt;preface &lt;/i&gt;&lt;br&gt;&lt;i&gt;acknowledgments &lt;/i&gt;&lt;br&gt;&lt;i&gt;about this book &lt;/i&gt;&lt;br&gt;&lt;i&gt;about the authors &lt;/i&gt;&lt;br&gt;&lt;i&gt;about the title &lt;/i&gt;&lt;br&gt;&lt;i&gt;about the cover illustration &lt;/i&gt;&lt;/p&gt; &lt;dl&gt;&lt;/dl&gt; &lt;h4&gt;&lt;i&gt;Part 1 ASP.NET AJAX basics &lt;/i&gt;&lt;/h4&gt; &lt;dl&gt; &lt;dt&gt;1 Introducing ASP.NET AJAX  &lt;dd&gt;1.1 What is Ajax?  &lt;dd&gt;1.2 ASP.NET AJAX architecture  &lt;dd&gt;1.3 ASP.NET AJAX in action  &lt;dd&gt;1.4 Summary  &lt;dt&gt;2 First steps with the Microsoft Ajax Library  &lt;dd&gt;2.1 A quick overview of the library  &lt;dd&gt;2.2 The Application model  &lt;dd&gt;2.3 Working with the DOM  &lt;dd&gt;2.4 Making development with JavaScript easier  &lt;dd&gt;2.5 Summary  &lt;dt&gt;3 JavaScript for Ajax developers  &lt;dd&gt;3.1 Working with objects  &lt;dd&gt;3.2 Working with JSON  &lt;dd&gt;3.3 Classes in JavaScript  &lt;dd&gt;3.4 Understanding inheritance  &lt;dd&gt;3.5 Understanding interfaces and enumerations  &lt;dd&gt;3.6 Using type reflection  &lt;dd&gt;3.7 Working with events  &lt;dd&gt;3.8 Summary  &lt;dt&gt;4 Exploring the Ajax server extensions  &lt;dd&gt;4.1 Ajax for ASP.NET developers  &lt;dd&gt;4.2 Enhancing an existing ASP.NET site  &lt;dd&gt;4.3 ScriptManager: the brains of an Ajax page  &lt;dd&gt;4.4 Partial-page updates  &lt;dd&gt;4.5 Summary  &lt;dt&gt;5 Making asynchronous network calls  &lt;dd&gt;5.1 Working with ASP.NET Web Services  &lt;dd&gt;5.2 The asynchronous communication layer  &lt;dd&gt;5.3 Consuming external Web Services  &lt;dd&gt;5.4 Using ASP.NET application services  &lt;dd&gt;5.5 Summary  &lt;dt&gt;6 Partial-page rendering with UpdatePanels  &lt;dd&gt;6.1 With great power comes great responsibility  &lt;dd&gt;6.2 Getting to know the UpdatePanel  &lt;dd&gt;6.3 Triggers  &lt;dd&gt;6.4 Advanced techniques  &lt;dd&gt;6.5 Live GridView filter  &lt;dd&gt;6.6 Summary &lt;/dd&gt;&lt;/dl&gt; &lt;h4&gt;&lt;i&gt;Part 2 Advanced techniques &lt;/i&gt;&lt;/h4&gt; &lt;dl&gt; &lt;dt&gt;7 Under the hood of the UpdatePanel  &lt;dd&gt;7.1 The PageRequestManager: the unsung hero  &lt;dd&gt;7.2 A client-side event viewer  &lt;dd&gt;7.3 UpdatePanel cookbook  &lt;dd&gt;7.4 Caveats and limitations  &lt;dd&gt;7.5 Summary  &lt;dt&gt;8 ASP.NET AJAX client components  &lt;dd&gt;8.1 The client component model  &lt;dd&gt;8.2 Working with client components  &lt;dd&gt;8.3 Behaviors  &lt;dd&gt;8.4 Controls  &lt;dd&gt;8.5 Summary  &lt;dt&gt;9 Building Ajax-enabled controls  &lt;dd&gt;9.1 Script descriptors  &lt;dd&gt;9.2 Introduction to Ajax-enabled controls  &lt;dd&gt;9.3 Extenders  &lt;dd&gt;9.4 Script controls  &lt;dd&gt;9.5 Summary  &lt;dt&gt;10 Developing with the Ajax Control Toolkit  &lt;dd&gt;10.1 A world of extenders  &lt;dd&gt;10.2 The Ajax Control Toolkit API  &lt;dd&gt;10.3 Animations  &lt;dd&gt;10.4 Summary &lt;/dd&gt;&lt;/dl&gt; &lt;h4&gt;&lt;i&gt;Part 3 ASP.NET AJAX Futures &lt;/i&gt;&lt;/h4&gt; &lt;dl&gt; &lt;dt&gt;11 XML Script  &lt;dd&gt;11.1 XML Script basics  &lt;dd&gt;11.2 Actions  &lt;dd&gt;11.3 Bindings  &lt;dd&gt;11.4 Summary  &lt;dt&gt;12 Dragging and dropping  &lt;dd&gt;12.1 The drag-and-drop engine  &lt;dd&gt;12.2 A drag-and-drop shopping cart  &lt;dd&gt;12.3 Summary &lt;/dd&gt;&lt;/dl&gt; &lt;h4&gt;&lt;i&gt;Part 4 Mastering ASP.NET AJAX &lt;/i&gt;&lt;/h4&gt; &lt;dl&gt; &lt;dt&gt;13 Implementing common Ajax patterns  &lt;dd&gt;13.1 Script versioning  &lt;dd&gt;13.2 Helpers, help me help you!  &lt;dd&gt;13.3 Logical navigation and unique URLs  &lt;dd&gt;13.4 Declarative data binding  &lt;dd&gt;13.5 Declarative widgets  &lt;dd&gt;13.6 Summary &lt;br&gt;&lt;i&gt;Installing ASP.NET AJAX &lt;/i&gt;&lt;br&gt;&lt;i&gt;Tools for debugging Ajax applications &lt;/i&gt;&lt;br&gt;&lt;i&gt;resources &lt;/i&gt;&lt;br&gt;&lt;i&gt;index &lt;/i&gt;&lt;img src="http://visit.geocities.com/visit.gif?&amp;amp;r=http%3A//www.manning.com/gallo/&amp;amp;b=Microsoft%20Internet%20Explorer%204.0%20%28compatible%3B%20MSIE%207.0%3B%20Windows%20NT%205.1%3B%20InfoPath.1%3B%20.NET%20CLR%201.1.4322%3B%20.NET%20CLR%202.0.50727%3B%20.NET%20CLR%203.0.04506.30%3B%20.NET%20CLR%203.0.04506.590%3B%20.NET%20CLR%203.5.20706%29&amp;amp;s=1680x1050&amp;amp;o=Win32&amp;amp;c=32&amp;amp;j=true&amp;amp;v=1.2" border="0"&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;We were also very fortunate to get forewords from both &lt;a href="http://weblogs.asp.net/scottgu" target="_blank"&gt;Scott Guthrie&lt;/a&gt;&amp;nbsp;and &lt;a href="http://weblogs.asp.net/bleroy/" target="_blank"&gt;Bertrand Le Roy&lt;/a&gt;&amp;nbsp;- a true honor. We hope you enjoy the book as much as we enjoyed sharing what we learned from the community, Microsoft and each other.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3509580" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="AJAX" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/AJAX/default.aspx" /><category term="Book" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Book/default.aspx" /></entry><entry><title>ASP.NET AJAX Role Application Service – Visual Studio 2008 (Orcas)</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/07/29/asp-net-ajax-role-application-service-visual-studio-2008-orcas.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/07/29/asp-net-ajax-role-application-service-visual-studio-2008-orcas.aspx</id><published>2007-07-30T04:30:00Z</published><updated>2007-07-30T04:30:00Z</updated><content type="html">&lt;P&gt;The first version ASP.NET AJAX gave us client-side support for two application services – &lt;A href="http://asp.net/ajax/documentation/live/ClientReference/Sys.Services/ProfileServiceClass/default.aspx" mce_href="http://asp.net/ajax/documentation/live/ClientReference/Sys.Services/ProfileServiceClass/default.aspx"&gt;profile&lt;/A&gt; and &lt;A href="http://asp.net/ajax/documentation/live/ClientReference/Sys.Services/AuthenticationServiceClass/default.aspx" mce_href="http://asp.net/ajax/documentation/live/ClientReference/Sys.Services/AuthenticationServiceClass/default.aspx"&gt;authentication&lt;/A&gt;. In Visual Studio 2008 (Orcas), an additional built-in service has been added: roles. If you’ve downloaded Eilon’s &lt;A href="http://weblogs.asp.net/leftslipper/archive/2007/02/22/asp-net-ajax-javascript-class-browser-take-3.aspx" mce_href="http://weblogs.asp.net/leftslipper/archive/2007/02/22/asp-net-ajax-javascript-class-browser-take-3.aspx"&gt;ASP.NET AJAX JavaScript Class Browser&lt;/A&gt; and installed the beta 2 (or beta 1) version of .NET 3.5, then you’ll find the new service under the Sys.Services namespace: 
&lt;P&gt;&lt;A class="" href="http://weblogs.asp.net/blogs/davidbarkol/RolesAppServiceLarge.png" target=_blank mce_href="http://weblogs.asp.net/blogs/davidbarkol/RolesAppServiceLarge.png" atomicselection="true"&gt;&lt;IMG src="http://weblogs.asp.net/blogs/davidbarkol/RolesAppService.png" mce_src="http://weblogs.asp.net/blogs/davidbarkol/RolesAppService.png"&gt;&lt;/A&gt;&amp;nbsp; 
&lt;P&gt;&lt;B&gt;Adding support for the role service&lt;/B&gt; 
&lt;P&gt;If you’re upgrading an ASP.NET 2.0 web site to .NET 3.5 and want to leverage this new built-in service, you’ll have to make a few minor adjustments to web.config (new web sites in .NET 3.5 will already have these configurations). The first change requires adding the role&amp;nbsp;service to the sectionGroup of the configuration settings:&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;sectionGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;webServices&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;section&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;jsonSerialization&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;requirePermission&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;allowDefinition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Everywhere&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;section&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;profileService&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;requirePermission&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;allowDefinition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;MachineToApplication&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;section&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;authenticationService&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;requirePermission&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;allowDefinition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;MachineToApplication&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;section&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;roleService&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;requirePermission&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;allowDefinition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;MachineToApplication&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;sectionGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Next, you need to enable the service from the list of web services under system.web.extensions:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;system.web.extensions&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;scripting&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;webServices&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;        
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;authenticationService&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;enabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;requireSSL&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; = &lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;false&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;         
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;profileService&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;enabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;roleService&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;enabled&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;webServices&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;        
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;scriptResourceHandler&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;enableCompression&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;enableCaching&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;true&lt;/SPAN&gt;"&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
  &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;scripting&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;system.web.extensions&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Interfacing with the service is done through a variable called Sys.Services.RoleService. The actual implementation is an object called Sys.Services._RoleService. The application services in ASP.NET AJAX use this pattern to provide a singleton-like access point. Here is an example of a call to the load and isUserInRole methods of the role service:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;function&lt;/SPAN&gt; pageLoad(){                          
    loadRoles();                         
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;function&lt;/SPAN&gt; loadRoles(){               
    Sys.Services.RoleService.load(onLoadRolesCompleted, onLoadRolesFailed, &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;null&lt;/SPAN&gt;);        
}

&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;function&lt;/SPAN&gt; onLoadRolesCompleted(result, userContext, methodName){                                        
    &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;if&lt;/SPAN&gt; (Sys.Services.RoleService.isUserInRole(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"Administrator"&lt;/SPAN&gt;)){
        $get(&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"adminView"&lt;/SPAN&gt;).style.display = &lt;SPAN style="COLOR: rgb(163,21,21)"&gt;"block"&lt;/SPAN&gt;;            
    }
}

&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;function&lt;/SPAN&gt; onLoadRolesFailed(error, userContext, methodName){
    alert(error.get_message());
}&lt;/PRE&gt;
&lt;P&gt;As an alternative to calling the&amp;nbsp;isUserInRole method, you can also retrieve a comma delimited list of roles for the user from the roles property: &lt;/P&gt;&lt;PRE class=code&gt;Sys.Services.RoleService.get_roles();&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Click &lt;A class="" href="http://weblogs.asp.net/blogs/davidbarkol/AppServices.zip" target=_blank mce_href="http://weblogs.asp.net/blogs/davidbarkol/AppServices.zip"&gt;here&lt;/A&gt; (requires SQL Express) for a working sample that demonstrates the use of all three services.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3326423" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="AJAX" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/AJAX/default.aspx" /><category term="Visual Studio" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Web Inspector for Safari on Windows</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/06/22/web-inspector-for-safari-on-windows.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/06/22/web-inspector-for-safari-on-windows.aspx</id><published>2007-06-22T11:32:00Z</published><updated>2007-06-22T11:32:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;If you've downloaded &lt;A class="" href="http://www.apple.com/safari/download/" target=_blank mce_href="http://www.apple.com/safari/download/"&gt;Safari for Windows&lt;/A&gt; and are a looking for a tool similar to &lt;A class="" href="http://www.getfirebug.com/" target=_blank mce_href="http://www.getfirebug.com"&gt;Firebug&lt;/A&gt;&amp;nbsp;or Nikhil's &lt;A class="" href="http://projects.nikhilk.net/Projects/WebDevHelper.aspx" target=_blank mce_href="http://projects.nikhilk.net/Projects/WebDevHelper.aspx"&gt;Web Development Helper&lt;/A&gt;,&amp;nbsp;then you might be interested in the &lt;A class="" href="http://webkit.org/" target=_blank mce_href="http://webkit.org/"&gt;WebKit Open Source Project&lt;/A&gt;. Within the project is a tool call Web Inspector that performs much of the same tasks as the tools mentioned earlier. To run the tool: &lt;/P&gt;
&lt;P mce_keep="true"&gt;1) Download the nightly build from &lt;A href="http://nightly.webkit.org/"&gt;http://nightly.webkit.org/&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;2) Extract the contents&amp;nbsp;from the zip file.&lt;/P&gt;
&lt;P mce_keep="true"&gt;
&lt;DIV mce_keep="true"&gt;3) If you are running Vista then you will have to add the following to the&amp;nbsp;end of the&amp;nbsp;&lt;STRONG&gt;Preferences.plist&lt;/STRONG&gt; file (under C:\Users\&amp;lt;UserName&amp;gt;\AppData\Roaming\Apple Computer\Safari\), just before &amp;lt;/dict&amp;gt;&amp;lt;/plist&amp;gt;:&amp;nbsp;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;key&amp;gt;WebKitUserStyleSheetLocationPreferenceKey&amp;lt;/key&amp;gt; &amp;lt;true/&amp;gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;4)&amp;nbsp;&amp;nbsp;Execute the &lt;STRONG&gt;run-nightly-webkit.cmd&lt;/STRONG&gt; file. This will launch Safari from the command prompt.&lt;/P&gt;
&lt;P mce_keep="true"&gt;After Safari is launched you will have an additional item in the context menu called 'Inspect Element', select this to see the tool:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 600px; HEIGHT: 561px" height=561 src="http://www.neudesic.com/uploads/david_barkol/WebInspector_ContextMenu.png" width=600 border=0 mce_src="http://www.neudesic.com/uploads/david_barkol/WebInspector_ContextMenu.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;Here are a few screenshots of it in action:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 650px; HEIGHT: 441px" height=441 src="http://www.neudesic.com/uploads/david_barkol/WebInspector_Network.png" width=650 border=0 mce_src="http://www.neudesic.com/uploads/david_barkol/WebInspector_Network.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 650px; HEIGHT: 385px" height=385 src="http://www.neudesic.com/uploads/david_barkol/WebInspector_Documents.png" width=650 border=0 mce_src="http://www.neudesic.com/uploads/david_barkol/WebInspector_Documents.png"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2890208" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="Vista" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Vista/default.aspx" /><category term="Safari" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Safari/default.aspx" /></entry><entry><title>We're on .NET Rocks!</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/05/08/we-re-on-net-rocks.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/05/08/we-re-on-net-rocks.aspx</id><published>2007-05-08T20:30:00Z</published><updated>2007-05-08T20:30:00Z</updated><content type="html">&lt;p&gt;A while back, &lt;a href="http://aspadvice.com/blogs/garbin/default.aspx" target="_blank"&gt;Garbin&lt;/a&gt;, &lt;a href="http://blogs.wdevs.com/ramavavilala/Default.aspx" target="_blank"&gt;Rama&lt;/a&gt; and myself did an interview with the &lt;a href="http://www.dotnetrocks.com" target="_blank"&gt;.NET Rocks&lt;/a&gt; guys. We were given an opportunity to talk about &lt;a href="http://ajax.asp.net" target="_blank"&gt;ASP.NET AJAX&lt;/a&gt; and our upcoming book. Today, the recording has been released on the site which you can find &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=235" target="_blank"&gt;here&lt;/a&gt;. Both Carl and Richard were fun and easy to talk to. Enjoy.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2523918" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="AJAX" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/AJAX/default.aspx" /></entry><entry><title>MIX07 Session: Extending the Browser Programming Model with Silverlight</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/davidbarkol/archive/2007/05/02/mix07-session-extending-the-browser-programming-model-with-silverlight.aspx" /><id>http://weblogs.asp.net/davidbarkol/archive/2007/05/02/mix07-session-extending-the-browser-programming-model-with-silverlight.aspx</id><published>2007-05-02T21:46:00Z</published><updated>2007-05-02T21:46:00Z</updated><content type="html">&lt;p&gt;There have been a lot of great sessions here at &lt;a href="http://www.visitmix.com/" target="_blank"&gt;MIX07&lt;/a&gt;. To compliment those sessions, there has been some great blog coverage as well. A great post is this one from from Scott Hanselman, that &lt;a href="http://www.hanselman.com/blog/PuttingMixSilverlightTheCoreCLRAndTheDLRIntoContext.aspx" target="_blank"&gt;puts things into context&lt;/a&gt; quite nicely. &lt;/p&gt;&lt;p&gt;Today I attended a session called &amp;quot;Extending the Browser Programming Model with Silverlight&amp;quot; that really stood out. This session wasn&amp;#39;t about streaming media or design, instead it addressed the core of Silverlight - working with Web Services, Application Services (Roles coming soon), Isolated Storage (which is going to be huge), the .NET CLR and of course JavaScript. There are still things that are being ironed out, but the future looks promising and Stefan Schackow did an excellent job of explaining not only how things worked but what to look for in future releases. &lt;/p&gt;&lt;p&gt;Look for this session to become available for &lt;a href="http://sessions.visitmix.com/"&gt;download and streaming&lt;/a&gt; soon. Also, Stefan was kind enough to upload both the slides and source to his mix sandbox (I wish every session did this) before the session even began. &lt;/p&gt;&lt;p&gt;Here are the links: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;MIX07 Sessions - &lt;a href="http://sessions.visitmix.com/" target="_blank"&gt;http://sessions.visitmix.com/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;Slides and source - &lt;a href="http://mixer1068.mixsandbox.com/" target="_blank"&gt;http://mixer1068.mixsandbox.com/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2482674" width="1" height="1"&gt;</content><author><name>davidbarkol</name><uri>http://weblogs.asp.net/members/davidbarkol.aspx</uri></author><category term="ASP.NET" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/ASP.NET/default.aspx" /><category term="Silverlight" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/Silverlight/default.aspx" /><category term="MIX07" scheme="http://weblogs.asp.net/davidbarkol/archive/tags/MIX07/default.aspx" /></entry></feed>