开发者

Retaining PreviousPage information after postback

开发者 https://www.devze.com 2023-01-09 02:57 出处:网络
I\'m using the asp.net PreviousPage functionality and cross-page postback.The problem i\'m running into is that if I have any postbacks on my page, the PreviousPage information seems to be lost.I don\

I'm using the asp.net PreviousPage functionality and cross-page postback. The problem i'm running into is that if I have any postbacks on my page, the PreviousPage information seems to be lost. I don't want to put it in ViewState because that will be quite large. I've thought about Session, but I don't want the data to persist after i've m开发者_StackOverflow社区oved on to another page, and I really don't like the idea of putting code in all my other pages to delete old session variables.

What methods do you use to retain this sort of information that was passed in via cross-page postback?

UPDATE:

Most of the answers to questions raised about refreshing the page mention using Response.Redirect. I can't use this because it will cause a Get rather than reposting the informaiton that was posted to the page via cross-page postback, resulting in a loss of this information and preventing me from pupulating my controls with the selection criteria of the previous page.

I need to update the data in the grid while retaining the postback information. I thought about using AJAX, but that's not really an acceptable solution right now per customer requirements. I need to click a button and refresh the page as if it was newly posted, and i don't really see a way to re-submit a postback short of F5 and then clicking the dialog to accept reposting of data.


Store the previous page's values in the ViewState on the initial page load.

0

精彩评论

暂无评论...
验证码 换一张
取 消