I used the script below to try and turn off autocomplete features for all my form data.
$(document).ready(function () { $("input").attr("autocomplete", "off"); });
However, chrome still saves the autocomplete data and shows previous entry in my login form. This also happens for IE.
How do I stop it from saving previous entered data/text? How do I prevent saved data entry if the user accepts the browser prompt to save the entered data for next time because it can be a potential security issue like saved passwords on a public computer?
I am using ASP .NET MVC3 with Kendo UI for all my form data.
A sample form data entry looks like this:
<div class="editor-field">
@Html.TextBoxFor(model => model.first_name, ViewBag.InactivePatient ? (object)new {@class = "formTextbox k-textbox" , disabled="disabled" } : new {@class = "formTextbox k-textbox"})
@Html.ValidationMessageFor(model => model.first_name)
</div>
Also, I tried manually putting autocomplete=off to each form entry but it led me to more errors and I would not like to have to append autocomplete=off to each entry.
Also, I tried appending new {autocomplete ="off"}
to @using (Ajax.BeginForm(null, null, new AjaxOptions { }, new { id = "patientForm" }))
but I get an error. So, what I'm asking is I'm not sure how to turn off autocomplete in asp .net forms.