How to create session in ASP.NET?

Shubham
Posted by Shubham under ASP.NET category on | Points: 40 | Views : 2605
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