• Handling ajax exception

            <p>First you need to add an handler to the event OnAsyncPostBackError of scriptmanager
    
  • Add update panel dynamically

            <pre data-sub="prettyprint:_">
            private Label Label1;
    
  • UpdatePanel load user control

            <pre data-sub="prettyprint:_">
            string ascx = "customerview.ascx";
            UpdatePanel1.ContentTemplate = this.LoadTemplate(ascx);
            </pre>
    
  • why set body margin to 0

            Because in IE7 body.marginleft == 10px, but firefox is 8px; ie7 margintop is 15px, firefox is 8px
    
  • Creating asp.net ajax class

            <pre data-sub="prettyprint:_">
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" >
            <head id="Head1" runat="server">
            <title>ASP.NET AJAX Class</title>
            <script type="text/javascript">function pageLoad(sender, args) {
            Type.registerNamespace('Wrox.ASPAJAX.Samples');
            Wrox.ASPAJAX.Samples.Album = function(title, artist) {
            this._title = title;        //_title = title;
            this._artist = artist;    }