Ajax ASP.Net Tutorial

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

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        ArrayList results = Product.Search(txtSearch.Text);
        if (results.Count > 0)
        {
            grdResults.DataSource = results;
            grdResults.DataBind();
            upResults.Update();
        }
    }



    Update UpdatePanel


    
    

            id="sm1"
        Runat="server" />
            id="upSearch"
        Runat="server">
        
                    id="txtSearch"
            Runat="server" />
                    id="btnSearch"
            Text="Search"
            OnClick="btnSearch_Click"
            Runat="server" />
        

    
            id="upResults"
        UpdateMode="Conditional"
        Runat="server">
        
        Results Time: <%= DateTime.Now.ToString("T") %>
        
                    id="grdResults"
            runat="server" />