开发者

How to go back to previous page in asp.net while retaining the previous page data

I am having problem while using onclick="javascript:history.back();" with Aspnet. In the first page i filled some data and click search button it show some results, i click on particular result for its details which navigate to the 2nd page but when i click on custom back button it refresh the page and all data set to initial values,when i use oncl开发者_如何学JAVAick="javascript:history.back();" I get nothing but the page displays "webpage has expired."

Thanks in advance!


This is because you are using HTTP POST for your search page. If you use HTTP GET (putting your parameters in the querystring) - then the browser won't display this message.

This has nothing specifically to do with ASP.NET. It's a (sensible) browser behaviour to prevent you from repeating an action that may have undesirable impacts (for instance, sending two copies of an order)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜