If you use textBox properties AutoCompleteType="Disabled" it disables the autocompletes of textBox on only Internet explorer. There's another way to stop auto-complete on all browsers. Use autocomplete="off" on from tag instead of AutoCompleteType = "Disabled". Again you can use the TextBox1.Attributes.Add("autocomplete", "off"); to stop auto-complete on only specific TextBox control.
So, my findings are use the following code to stop autocomplete on specific control
So, my findings are use the following code to stop autocomplete on specific control
protected void Page_Load(object sender, EventArgs e)or
{
TextBox1.Attributes.Add("autocomplete", "off");
}
<asp:TextBox ID="TextBox2" runat="server" AutoComplete="off"or Disable all auto-completes from all TextBox controls by
Width="248px"></asp:TextBox>
<form id="form1" runat="server" AutoComplete="off">
<div>
<asp:TextBox ID="TextBox1" runat="server"
Width="248px"></asp:TextBox>
<asp:Button ID="btn" Text="asdsad" runat="server" />
</div>
</form>
i kept autocomplete="off" and autocompletetype="disabled" even though i'm getting autocomplete can anyone help me
ReplyDelete