ASP.NET Create Session Problem
-
Hello Everyone~! This is the code I use to create the session on MemberPage1: //The textbox1 is the username. I create it as a session to pass to other page. Session("Username") = TextBox1.Text Response.Redirect("MemberPage2.aspx") This is the code I use on another page MemberPage2: Dim Username As String Label3.Text = "Welcome " & Session("Username") & "" //I want to test it with displaying a welcome follow by username. But the above code doesn't work.The Session remains null.I'm beginner in ASP.NET with VB backed code. Anyone can tell me the error or any other solution? Thank you~!
-
Hello Everyone~! This is the code I use to create the session on MemberPage1: //The textbox1 is the username. I create it as a session to pass to other page. Session("Username") = TextBox1.Text Response.Redirect("MemberPage2.aspx") This is the code I use on another page MemberPage2: Dim Username As String Label3.Text = "Welcome " & Session("Username") & "" //I want to test it with displaying a welcome follow by username. But the above code doesn't work.The Session remains null.I'm beginner in ASP.NET with VB backed code. Anyone can tell me the error or any other solution? Thank you~!
hi, how i am using session in my application .. its in c#.. Session["sername"]=TextBox1.Text //its right then on page 2 no need to define variable again Label3.Text = "Welcome " + Session["Username"].ToString(); check ,if this giving u value or not. :)
pallavi
-
hi, how i am using session in my application .. its in c#.. Session["sername"]=TextBox1.Text //its right then on page 2 no need to define variable again Label3.Text = "Welcome " + Session["Username"].ToString(); check ,if this giving u value or not. :)
pallavi
Thank you Mr Pallavi. I got it now. Thank you so much. :) Regards Drexler