I have an MVC application which dynamically loads and displays inputs for text and checkbox. Depending upon a users input spans are displayed and hidden on the client side using JQuery which works well. The problem is if a user hits F5 to refresh the page. The input values are remembered but the span display/ hide is not. What I want to do is force the HttpGet action of the controller to always fully reload the page resetting all values. Is there anyway to do this?
Thanks
P
P.S. I dont want to traverse the document on load in JS to re-hide /re-show the spans based upon the input values.
You can use the
autocomplete="off"parameter. It works on both theinputandformelement, eg.It’s worth noting though, that this attribute is only valid in HTML5, but works in most browsers regardless of doctype.