W3C validator – “there is no attribute “AutoComplete””

When you try to validate your page with W3C Markup Validation Service at the line when you have a TextBox with AutoComplete attribute like this:

<asp:TextBox ID="myTextBox" runat="server" AutoComplete="Off" />

show the following error message:

there is no attribute “AutoComplete”

Solution:
Change
AutoComplete=”Off”
to
AutoCompleteType=”None”

<asp:TextBox ID="myTextBox" runat="server" AutoCompleteType="None" />

Did my solution solve your problem? Leave a reply.

5 thoughts on “W3C validator – “there is no attribute “AutoComplete”””

  1. nopes…. it now shows there is no attribute “AutoCompleteType”
    But i found this :

    Reference: http://forums.asp.net/t/881734.aspx

    Autocomplete is not XHTML compliant. Autocomplete feature is platform and browser dependent. If attribute is missing then browser behavior will be as defined in the client OS. According to http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/autocomplete.asp Autocomplete is Microsoft extension to HTML. Therefore, it is impossible to generate XHTML compiant file with this attribute. If you want XHTML compliant output avoid setting attribute to ON or OFF and rely on default OS behavior. Most browsers support the attribute (including Mozilla) but it does not make attribute XHTML compliant.

    1. Hi, thank you for your comment. I verified and the webpage where I have applied my solution using “W3C Markup Validation Service” is Valid “XHTML 1.0 Transitional”.

      1. oh is it??? I don’t really know why its showing the same error this time for “AutoCompleteType” 😐

        I have also tried creating a dummy page in my local with the same content and then uploading it to check.. the same error is being shown 🙁

    1. Try this sample. Create a Test.aspx page with the following lines:

      <%@ Language=C# %>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

      <html xmlns="http://www.w3.org/1999/xhtml ">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Test</title>
      </head>
      <body>
      <form id="MyForm" runat="server">
      <asp:TextBox ID="myTextBox" runat="server" AutoCompleteType="None" />
      </form>
      </body>
      </html>

Leave a Reply