R
ruca
Hi,
How can I pass the values of some variables from page1.aspx to page2.aspx?
I try to define some variables in page2 and then when I click a button in
page1 it will fill that variables (in page2) with values. The proble is that
when I call page2 variable values are NULL.
Like this:
-------------------------------BEGIN
CODE-----------------------------------------------
Imports AppName.ClassNamePage2
Dim m_Page2 as New ClassNamePage2
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
//This values are in a DataSet and are correct (I debug them)
m_Page2.m_lIdHrq = CLng(ds.Tables("Dados").Rows(0).Item("IdLevel"))
m_Page2.m_lNivelHrq = CLng(ds.Tables("Dados").Rows(0).Item("Level"))
m_Page2.m_strFnc = CStr(ds.Tables("Dados").Rows(0).Item("Name"))
//this value it is given from a dropdownlist (I check it, and it returns
the right value)
m_Page2.m_lIdFnc = CLng(UserName.SelectedItem.Value.ToString())
Response.Redirect("Page2.aspx")
//When opens page2.aspx the values are NULL
End Sub
-------------------------------END
CODE-----------------------------------------------
How can I solve this?
How can I pass the values of some variables from page1.aspx to page2.aspx?
I try to define some variables in page2 and then when I click a button in
page1 it will fill that variables (in page2) with values. The proble is that
when I call page2 variable values are NULL.
Like this:
-------------------------------BEGIN
CODE-----------------------------------------------
Imports AppName.ClassNamePage2
Dim m_Page2 as New ClassNamePage2
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.ServerClick
//This values are in a DataSet and are correct (I debug them)
m_Page2.m_lIdHrq = CLng(ds.Tables("Dados").Rows(0).Item("IdLevel"))
m_Page2.m_lNivelHrq = CLng(ds.Tables("Dados").Rows(0).Item("Level"))
m_Page2.m_strFnc = CStr(ds.Tables("Dados").Rows(0).Item("Name"))
//this value it is given from a dropdownlist (I check it, and it returns
the right value)
m_Page2.m_lIdFnc = CLng(UserName.SelectedItem.Value.ToString())
Response.Redirect("Page2.aspx")
//When opens page2.aspx the values are NULL
End Sub
-------------------------------END
CODE-----------------------------------------------
How can I solve this?