views:

249

answers:

2

I'm using the .net ajaxtoolkit control AutoCompleteExtender. It works great but my firefox autocomplete overrides the values that the extender is returning (the firefox one lays on top of the control's).

is there a way to disable the browser's version of autocomplete so that the .net one takes precendence?

+1  A: 

If you are using an ASP.Net TextBox, you can simply add the following attribute to the control:

AutoCompleteType="Disabled"

Looks something like this:

<asp:TextBox ID="tbFirstName" runat="server" AutoCompleteType="Disabled" />

EDIT:

The property above only works for IE based browsers. However, if you add this attribute to the control:

autocomplete="off"

It should work in FireFox and Chrome.

Josh
Tried that...it's still doing it in Firefox. I checked the source code and there's nothing on the <input type="textbox"> that would indicate it shouldn't try to autocomplete....
Kyle
+1  A: 

Try this:

<asp:TextBox ID="txtFirstName" runat="server" autocomplete="off" />

The trick is setting autocomplete="off".

Actually it is defined in HTML 5 standards, but should work in most modern browsers.

Alex
that worked. Thanks!
Kyle