How do you pass session values from one page to another ?

Answer Posted / pravesh chourasia

1.In first page set session variable. e.g.

Session ["Name"] = "Pravesh";

Here "Name" is name of session variable and "Pravesh" is
the value of session variable "Name".

2. In next page get the sesion variable. e.g.:-

string myName=Session["Name"].ToString();

Is This Answer Correct ?    98 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types cache in asp net?

631


Name the tools or API for developing or testing web api?

619


What are the session variables?

596


What is HTTPModule and HTTPcontext? What is the use of each?

2076


What is the difference between client-side and server-side validations in ASP.NET?

751






What is difference between asp state management and asp.net state management? How can we pass info between 2 asp.net pages?

572


what is AutoEventWireUp and what is the use of This property explain in details?

1222


Define the term Web Garden?

618


Using code explain Configuration Management

1499


Is asp.net free?

645


What is web api config?

644


Which method do you use to kill explicitly a users session?

717


What is considered a service provider?

603


Why would a company use an application service provider?

579


What are custom controls?

619