开发者

mvc and the back button

开发者 https://www.devze.com 2022-12-08 23:16 出处:网络
I\'m new to mvc so I don\'t know if there is a trick to this or not. When a user runs a search on a site I\'m building and I take them开发者_高级运维 to the results page, if I click the back button th

I'm new to mvc so I don't know if there is a trick to this or not. When a user runs a search on a site I'm building and I take them开发者_高级运维 to the results page, if I click the back button the search form is empty. Is there some way to keep the form fields populated as they were when going back (without resorting to session)? Thanks.


Strange.
Fields should be there by default. What browser are you using?

If you're using a regular browser, then maybe your doing something weird, like, resetting the fields via JavaScript or something. Perhaps elaborating more on your current implementation would help diagnosing your problem?

A last solution would be saving the fields as a cookie and loading them via JavaScript on the forms page inside onLoad.

0

精彩评论

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