Session variable

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.
 
J

Jacek Stawicki

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.
 
G

Guest

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>");
 
J

James

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

Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,367
Latest member
Monarch

Latest Threads

Top