T
Tor Inge Rislaa
How to refer to a variable on another webform
Hi, I have a Webform1 with a public variable that is assigned a value before
my Webform2 is displayed. In the Page_Load procedure of Webform2 I want to
evaluate the value of the variable of Webform1.
Code on Webform1
Public MyVar1 As Integer
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
MyVar1 = 1
Server.Transfer("Webform2.aspx")
End Sub
Code on Webform2
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim Myvar2 As Integer
Myvar2 = (Myvar1 from Webform1... Any Ideas?)
End Sub
T I Rislaa
Hi, I have a Webform1 with a public variable that is assigned a value before
my Webform2 is displayed. In the Page_Load procedure of Webform2 I want to
evaluate the value of the variable of Webform1.
Code on Webform1
Public MyVar1 As Integer
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
MyVar1 = 1
Server.Transfer("Webform2.aspx")
End Sub
Code on Webform2
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim Myvar2 As Integer
Myvar2 = (Myvar1 from Webform1... Any Ideas?)
End Sub
T I Rislaa