开发者

stop formfields prefilling

i have a asp.net form that opens in a jquery overlay. for some reason when this form opens the browser tries to prefill my 'confirm email' textbox with a username like 'admin' i have nothing to suggest this is a username field. cannot see how i can remove this.

<div class="loginPanelLabel">
Confirm email*
</div>
<div class="loginPanelControl">
<asp:Te开发者_开发百科xtBox ID="tbConfirmEmail" Text="" runat="server"></asp:TextBox>
</div>
<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Email address must match" ControlToCompare="tbEmail" ValidationGroup="Group1" ControlToValidate="tbConfirmEmail" CssClass="validator"></asp:CompareValidator> 
</div>

Any ideas?


It's probably just some bad data in your own browser's autofill. If you try a different browser it should not be an issue.

The browser stores autofill values based on the input ID. If you want to prevent autofill you can either randomise the input ID or use autocomplete="off" as per the other answers.


I Just looked how YouTube does this in their search box; they use autocomplete="off", too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜