How to create session in ASP.NET?

Posted by Shubham under ASP.NET category on | Points: 40 | Views : 3132
on home or login page

string n = Shubham;
Session["a"] = n;

you also use textbox on place of Shubham

on which page you want to retrive the session :---

Label2.Text = Session["a"].ToString();

on this code your session in retrive on next page....

Comments or Responses

Login to post response