Clear the auto-fill of forms asp.net mvc

0

I have a registration screen where I noticed that when the user lets the browser write the cache, when it will fill always comes a list of information that has already been typed, I would like to clear this information in a way that did not offer this information typed. Detail, I'm using session, not then could not interfere.

Thank you

    
asked by anonymous 17.01.2016 / 02:46

1 answer

0

In ASP , to prevent form caching, you can use

<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

You can directly use the following HTML:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">

And also, in the form, you can include the property autocomplete="off"

    
17.01.2016 / 02:54