Page Lifecycle ASP.Net Tutorial

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

    public string SearchString
    {
        get { return txtSearch.Text; }
    }



    Button Search Typed


    
    

            id="lblSearch"
        Text="Search:"
        Runat="server" />
            id="txtSearch"
        Runat="server" />
            id="btnSearch"
        Text="Go!"
        PostBackUrl="NextPage.aspx"
        Runat="server" />
    

    


File: NextPage.aspx
<%@ Page Language="C#" %>
<%@ PreviousPageType VirtualPath="~/Default.aspx" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    void Page_Load()
    {
        if (Page.PreviousPage != null)
        {
            lblSearch.Text = String.Format("Search For: {0}", PreviousPage.SearchString);
        }
    }



    Button Search Results Typed


    
    

            id="lblSearch"
        Runat="server" />