0

I have this textBox:

    <asp:TextBox ID="txtInsuredPassword" TabIndex="1" runat="server" Width="157px"
          TextMode="Password" AutoCompleteType="Disabled" >
    </asp:TextBox>

AutocompleteType ="Disabled" is not working on chrome and I found that I have to use autocomplete="Off", but I cannot find it in my control ... any suggestions?

As you can see here autocomplete is not available

AlessHo
  • 1,021
  • 1
  • 16
  • 35

3 Answers3

1

In the New page inside your Mark Up before your txtInsuredPassword try to keep this input type so that your problem will be solved

  <input style="display: none" type="password" name="fakepassword" />

At the time of DOM loading , broswer would first check for the inputtype password and autofill it with the Passowrd so we are just trying to avoiding it by keeping a fakepassword as input type

The Blue Shirt Developer
  • 8,076
  • 4
  • 30
  • 45
  • I have tried your solution, it is working only when I remove display none, otherwise I am facing the same issue. I used visibility:hidden with 0px for width and height, and it works normally. Any idea about why on visibility:hidden it works and display: none does not? – AlessHo Dec 28 '16 at 12:49
  • this is my solution, I did not add anything for the real password, neither autocomplete ... – AlessHo Dec 28 '16 at 13:22
  • @H.Al i need your complete markup how you are keeping – The Blue Shirt Developer Dec 28 '16 at 13:42
0
autocomplete="Off", but I cannot find it in my control ... any suggestions

Just place it on your asp.net text control and will appear on the html rendered page.

So your code will be as:

   <asp:TextBox ID="txtInsuredPassword" TabIndex="1" runat="server" Width="157px"
          TextMode="Password" AutoCompleteType="Disabled" autocomplete="Off" >
    </asp:TextBox>
Aristos
  • 63,580
  • 14
  • 112
  • 146
  • I added autocomplete="Off" , it is not firing any error but on chrome it still saves the password – AlessHo Dec 28 '16 at 09:51
  • @H.Al check this answer for a solution on that. http://stackoverflow.com/questions/12374442/chrome-browser-ignoring-autocomplete-off – Aristos Dec 28 '16 at 13:57
-1

Did you try this answer? If you're using firefox then you have to use: autocomplete="off" or from code behind:

Textbox1.Attributes.Add("autocomplete", "off");
Aminur Rashid
  • 711
  • 6
  • 12
  • I updated my question so you can see better in the added picture what I mean by autocomplete is not available, anyway I tried to use it in code behind and still not working ... – AlessHo Dec 28 '16 at 09:34
  • autocomplete is attribute of html textbox, not asp.net specific textbox. that's why it's not showing in your suggestion. – Aminur Rashid Dec 28 '16 at 09:40