G
Guest
I am using server.transfer for a website being developed in vs.net 2005
And I need to get the posted values after server.transfer. For this I set
the second parameter "true" in the transfer method. Also enableViewStateMac
is made false in the destination page. Still I cannot get some changed values.
The scenario is such -
1. I have page 1 with a hidden variable named,"myHid" whose value is set to
"Text1"
2. When a submit happens on page1 to the same page, on page_load after
postback I do some database manipulations and then change the text of the
hidden variable to "Text2"
3. After this I do - server.transfer("page2.aspx",true)
4. In page2.aspx on page load I try to access the hiddenvariable using
request.params("myHid"). Doing this gives me the value "Text1". I do not get
the value "Text2".
Is this because in page_load just before transfer I modified the value and
by then the Post had already happened.
If so, what is the solution to access posted values even after they are
changed after postback.
And I need to get the posted values after server.transfer. For this I set
the second parameter "true" in the transfer method. Also enableViewStateMac
is made false in the destination page. Still I cannot get some changed values.
The scenario is such -
1. I have page 1 with a hidden variable named,"myHid" whose value is set to
"Text1"
2. When a submit happens on page1 to the same page, on page_load after
postback I do some database manipulations and then change the text of the
hidden variable to "Text2"
3. After this I do - server.transfer("page2.aspx",true)
4. In page2.aspx on page load I try to access the hiddenvariable using
request.params("myHid"). Doing this gives me the value "Text1". I do not get
the value "Text2".
Is this because in page_load just before transfer I modified the value and
by then the Post had already happened.
If so, what is the solution to access posted values even after they are
changed after postback.