Thursday, March 29, 2012

Session variable

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.Uytkownik "James" <james@.nodomain.netnapisa w wiadomoci
news:%23orOxZppGHA.3324@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

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.

--
JS
BRE Bank Dev Team, Poland
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" wrote:

Quote:

Originally Posted by

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


It's good to know people who know what they are doing!

Thanks, it worked great!

"Peter Bromberg [C# MVP]" <pbromberg@.yahoo.nospammin.comwrote in message
news:F6B66951-B4B5-4F69-A709-F163BA74EAA1@.microsoft.com...

Quote:

Originally Posted by

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" wrote:
>

Quote:

Originally Posted by

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

0 comments:

Post a Comment