View Full Version : Server.Transfer
john27157
09-23-2004, 01:14 AM
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.
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.
bruce
09-23-2004, 07:38 AM
Check out this article,
http://www.developer.com/net/asp/article.php/3299641
[b]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
vBulletin® ©Jelsoft Enterprises Ltd.