Page Lifecycle ASP.Net Tutorial

<%@ Page Language="VB" %>



    Button Search


    
    

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

    


File: NextPage.aspx
<%@ Page Language="VB" %>


    Sub Page_Load()
        If Not IsNothing(PreviousPage) Then
            Dim txtSearch As TextBox = CType(PreviousPage.FindControl("txtSearch"), TextBox)
            lblSearch.Text = String.Format("Search For: {0}", txtSearch.Text)
        End If
    End Sub
    



    Button Search Results


    
    

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