Textbox – supress previous entries – auto complete off

Hi,

I am developing a website and noticed that all my text boxes were repeating the content that had been entered previously.

Found this blog here;
http://ryanfarley.com/blog/archive/2005/02/23/1739.aspx (I like ryans stuff).

In short you can turn this off via the autocomplete=”off” property.
This can be set in a number of ways:

  1. On the form, this disables it for all content on the form. This is really handy if you are using master pages as add it to your master page and job done, your entire site now stops prompting.
  2. On a control by control basis;
    [html]<asp:TextBox ID="txtText" runat="server" autocomplete="off" >[/html]

Note: Visual studio will complain that it does not know this property but it works none the less so just ignore VS.

Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.