Ajax ASP.Net Tutorial

<%@ Page Language="C#" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    protected void dtlProduct_DataBound(object sender, EventArgs e)
    {
        string productTitle = (string)DataBinder.Eval(dtlProduct.DataItem, "Title");
        if (sm1.IsInAsyncPostBack)
        {
            sm1.RegisterDataItem(Head1, productTitle);
        }
        else
        {
            Head1.Title = productTitle;
            hTitle.InnerHtml = productTitle;
        }
    }



    UpdatePanel DataItem


    
    

            id="sm1"
        Runat="server" />
    
            id="upSearch"
        Runat="server">
        
                    id="dtlProduct"
            DataSourceID="srcProducts"
            AllowPaging="true"
            Runat="server" OnDataBound="dtlProduct_DataBound" />
        

    
            id="srcProducts"
        ConnectionString='<%$ ConnectionStrings:con %>'
        SelectCommand="SELECT Id,Title,Director FROM Product"
        Runat="server" />
    

    
    
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_pageLoaded( prm_pageLoaded );
    function prm_pageLoaded(sender, args)
    {
        if (prm.get_isInAsyncPostBack())
        {
            var productTitle = args.get_dataItems()['Head1'];
            document.title = productTitle;
            $get('hTitle').innerHTML = productTitle;
        }
    }