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

Explain how is a property designated as read-only?

541


Name the two properties are on every validation control?

536


What is the difference between user control and custom control?

470


How do you design a website with multilingual support in ASP.NET ?

533


What is master page in dtp?

538






What is the purpose of url encoding?

482


How do cookies work? Give an example of their abuse.

535


How does session state work in asp.net?

489


What is the procedure to create the environment for asp.net? : asp.net mvc

505


How do u optimize a query in asp.net?

554


What is difference between asp.net and asp.net mvc? : Asp.Net MVC

476


how can create login from create and written conde in asp.net

1769


What is Bundling and Minification in MVC?

572


What are early binding and late binding.

558


Does asp.net still recognize the global.asa file?

547