G
Gauthier Segay
Hello,
I've problem on subsequent postbacks after a Server.Transfer was done.
In our application framework we have a method that pass parameters (via
HttpContext.Items) and navigate to another page (via Server.Transfer),
this work nicely for what it's done for: passing parameters to another
page.
Now my problem is on the destination page, If I affect something to the
viewstate, it's available in the statebag during the current request,
but subsequent postback on the same page loose my viewstate.
Here is a simple stepped exemple to expose my problem in a more
synthetic manner:
========8<============8<============
Page1:
[STEP1] Page_Init...Page_Load...Page_Render... User click on Btn1
[STEP2] Page_Init...Btn1_Click...Server.Transfer
Page2:
[STEP3] Page_Init...Page_Load...Page_Render... User click on Btn1
[STEP4] Page_Init...Btn1_Click... nothing in viewstate
========8<============8<============
Clearly, if I put something in viewstate during step3, I got nothing in
it during step4.
It seems to be an asp.net bug.
Do you have a solution or workarround? (I don't want to rely on Session
variables).
Thanks
Gauthier Segay
I've problem on subsequent postbacks after a Server.Transfer was done.
In our application framework we have a method that pass parameters (via
HttpContext.Items) and navigate to another page (via Server.Transfer),
this work nicely for what it's done for: passing parameters to another
page.
Now my problem is on the destination page, If I affect something to the
viewstate, it's available in the statebag during the current request,
but subsequent postback on the same page loose my viewstate.
Here is a simple stepped exemple to expose my problem in a more
synthetic manner:
========8<============8<============
Page1:
[STEP1] Page_Init...Page_Load...Page_Render... User click on Btn1
[STEP2] Page_Init...Btn1_Click...Server.Transfer
Page2:
[STEP3] Page_Init...Page_Load...Page_Render... User click on Btn1
[STEP4] Page_Init...Btn1_Click... nothing in viewstate
========8<============8<============
Clearly, if I put something in viewstate during step3, I got nothing in
it during step4.
It seems to be an asp.net bug.
Do you have a solution or workarround? (I don't want to rely on Session
variables).
Thanks
Gauthier Segay