Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Session state in ASP.net


Message #1 by Leena Natekar <paradise_flycatcher@y...> on Sat, 23 Jun 2001 03:53:57 -0700 (PDT)
Hi,



I have just begun with ASP.NET and I need some help

regards to session management in ASP. 



Problem : I have a form a.aspx. I need to put some

data here in the session so that after the form is

submitted to b.aspx I can retrieve it in b.aspx. 



The problem I faced: I tried using the session this

way: Note the HttpSessionState is not documented..

a.aspx -->Page_Load()-->

HttpSessionState sessinoState = Page.Session;

sessionState.Add("MyData",data);

b.aspx-->Page_Load()-->

HttpSessionState sessinoState = Page.Session;

String strMyData = sessinoState["MyData"];



This gives me an exception. I tried getting the array

with the "all" property of HttpSessionState and the

length of the array is 0.



How to get my data across to the other page, this

being not form data?



Thanks,

Best Regards,

Leena.






  Return to Index