Server.Transfer

Discussion in 'ASP.NET / ASP.NET Core' started by john27157, Sep 23, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Does anyone have some code that would show me how Server.Transfer works to transfer data from one web form page to the next? I have been trying to get it to work with an onsubmit or onclick event, but to no avail.

    Please help.
     
  2. You have this on PageA.aspx

    <%@ Page Language="VB" ClassName="LoginClass" ..... %>

    <script language="VB" runat="server">
    Public ReadOnly Property LoginID() As String
    Get
    Return objectId.Text
    End Get
    End Property
    .......

    Server.Transfer("PageB.aspx", True)

    _____________________________________
    and here is the PageB.aspx

    <%@ Reference Page="PageA.aspx" %>
    ....
    <script language=VB" runat="server">

    Dim receivingclass As LoginClass 'input from PageA.aspx

    Sub Page_Load(Source As Object, E As EventArgs)
    If Not Page.IsPostBack Then
    receivingclass = CType(Context.Handler, LoginClass)
    objectId.text = receivingclass .LoginID
    .....

    that is all you need.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Check out this article,

    http://www.developer.com/net/asp/article.php/3299641


    quote:Originally posted by john27157

    Does anyone have some code that would show me how Server.Transfer works to transfer data from one web form page to the next? I have been trying to get it to work with an onsubmit or onclick event, but to no avail.

    Please help.
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page