Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent textbox autofill with previously entered values

I have an asp page with some Textbox controls on it.

By default, the browser will suggest previously entered values for each box.

I'd like to prevent that behavior for some of the textboxes.

Is there a way to reliably do that across all major browsers?

I've tried setting

AutoCompleteType="Disabled" 

But that seems to have no effect in Firefox.

Here is an image of the behavior I'm trying to prevent.

enter image description here

like image 627
JosephStyons Avatar asked Mar 13 '12 14:03

JosephStyons


People also ask

How do I stop textbox from auto filling?

Click the Display tab. Do one of the following: To enable AutoComplete for the text box, select the Enable AutoComplete check box. To disable AutoComplete for the text box, clear the Enable AutoComplete check box.

How do I turn off input box suggestions?

The solution is to add autocomplete=”off” attribute to textbox tag, which will help to stop auto suggestion behaviour for that particular textbox. And if you want to stop that behaviour for all the textboxes that are present inside a form then add autocomplete=”off” attribute to form tag..

How do you turn off auto fill?

In the Settings window, find the “Auto-fill” section, and disable autofill individually under three categories — Passwords, Payment methods, & Addresses and more. 3. First off, click on “Passwords” and switch off the toggle next to “Offer to save passwords”.


2 Answers

For firefox

Either:

<asp:TextBox id="Textbox1" runat="server" autocomplete="off"></asp:TextBox> 

Or from the CodeBehind:

Textbox1.Attributes.Add("autocomplete", "off"); 
like image 95
PraveenVenu Avatar answered Sep 21 '22 19:09

PraveenVenu


Autocomplete need to set off from textbox

<asp:TextBox ID="TextBox1" runat="server" autocomplete="off"></asp:TextBox> 
like image 22
Pankaj Avatar answered Sep 23 '22 19:09

Pankaj