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

What are the advantages and limitations of query string?

0 Answers  


main difference between asp.net2.0,asp.net1.1,asp.net1.0

15 Answers   Inflexion, Infosys, iSoft, Microsoft, Prakruthi,


What is the difference between <%#%> and <%=%>?

4 Answers   IBS,


What is the sequence in which ASP.NET events are processed?

0 Answers  


How can you dynamically add user controls to a page?

0 Answers  






Can the unique key be null?

0 Answers  


What is event in asp.net?

0 Answers  


To call a Web service which transport protocol you can use?

3 Answers   Siebel,


What is fulltrust?

0 Answers  


What is the difference between page directive include and action tag include?

0 Answers  


Suppose you want an asp.net function (client side) executed on the mouseover event of a button. Where do you add an event handler?

0 Answers  


What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout

2 Answers   Syntax Softtech,


Categories