Session variable

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hello,


I have a form with a button that opens a new browser with another form. I
want to be able to change a session variable before the new form is loaded.
Can this be done? If yes, how? Thank you in advance and your help is greatly
appreciated.
 
U¿ytkownik "James said:
Hello,


I have a form with a button that opens a new browser with another form. I
want to be able to change a session variable before the new form is
loaded. Can this be done? If yes, how? Thank you in advance and your help
is greatly appreciated.

For me there is only one solution. On the second page in Page_Load method
change this variable.
 
You would put all the code in the server-side button click handler. e.g.,

Session["myValue"]="new value";
Response.Write("<script>window.Open("hewpage.aspx");</script>");
 
It's good to know people who know what they are doing!

Thanks, it worked great!


Peter Bromberg said:
You would put all the code in the server-side button click handler. e.g.,

Session["myValue"]="new value";
Response.Write("<script>window.Open("hewpage.aspx");</script>");

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




James said:
Hello,


I have a form with a button that opens a new browser with another form. I
want to be able to change a session variable before the new form is
loaded.
Can this be done? If yes, how? Thank you in advance and your help is
greatly
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top