session无法传值
第一页
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
.....
if TextBox1.Text =trim(a) And TextBox2.Text =trim(b) and TextBox3.Text=Cstr(ViewState("VNum")) Then
Session("User1") =TextBox1.Text ‘输入的值是电话
Response.Redirect("./login.aspx")
....
Else
Label1.Text = "<font color='red'>您的信息不正确!</font>"
'刷新
'Response.Redirect(Request.Url.ToString())
end if
Loop
conn.Close()
End Sub
第二页(接值)
Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs)
dim num as integer
num=Session("User1")
Label8.text= num.tostring '为什么收不到
End Sub
谢谢