Can session variables be accessed from code-behind?

Answers were Sorted based on User's Feedback



Can session variables be accessed from code-behind?..

Answer / swapna

Yes. You can access the "Session" dictionary within a code-
behind file just like you would if you were accessing it
from within an line .aspx file.

For example: Session("Name") = "Scott"

Is This Answer Correct ?    16 Yes 3 No

Can session variables be accessed from code-behind?..

Answer / gggg

" YES "

simply take 2 websites

for example in 1st website..... u have a textbox1

on page load()
--------------
Session["name"]=textBox1.Text;

in 2nd website..........

on page load()
-------------

Response.Write(Session["name"]);



definatly u will get the ans ,, whatever u entering in the
textbox1 in 1st website that will displat in 2nd website

Is This Answer Correct ?    12 Yes 10 No

Post New Answer

More ASP.NET Interview Questions

Can you explain one critical mapping? Performance issue which one is better?

0 Answers  


Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?

0 Answers  


If Asp Dot Application is stateless what happened? during designing

3 Answers   TCS,


What are the differnt types of handler in ASP.NET?

0 Answers   Sans Pareil IT Services,


Define msil.

0 Answers  






What is the Difference between MVC And MVP design pattrens

0 Answers   Symphony,


extensibility in asp.net2.0

0 Answers  


Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?

0 Answers  


Difference between HTML control and Web Server Control?

4 Answers  


What is the difference between dispose() and finalize()?

0 Answers  


Explain about asp.net 2.0 themes?

0 Answers  


What is an assembly?

2 Answers   Value Labs,


Categories