开发者

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

开发者 https://www.devze.com 2023-02-03 02:30 出处:网络
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

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

精彩评论

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