views:

139

answers:

1

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.

A: 

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.

ANaimi
I'm using google chrome. I'm not doing anything fancy at all. The person submits the form which calls the ActionResult and shows the associated view. If in the results view I click the back button my search fields are empty.
geoff
It could be IE 6. I don't know if 7 also has that behavior too.
voyager
I take that back... I was in IE8. Chrome seems to work fine. IE8 doens't seem to like the back button.
geoff