0

I need to clear the textbox text after page load when i run my application i will see a login page but the password is displayed in the form of dots and after getting logged out again it appears as dots i should display it empty instead of showing dots and this happens only for password text box i tried in many ways by taking txtpassword.text=""; in page load also i did txtpassword.text=string.empty; but nothing works for me how can i do this

<asp:TextBox ID="txtpassword" runat="server"  Width="180px" Height="20px"></asp:TextBox>
abc
  • 61
  • 1
  • 10
  • This sounds like it's the browser's autocomplete that's saving login details, not a value coming from your output – Rory McCrossan Mar 23 '17 at 08:37
  • then how can i resolve this issue because the textbox should be empty – abc Mar 23 '17 at 08:37
  • Try adding `autocomplete="off"` as an attribute on the `form` or the `input`, depending on the level you want to disable it – Rory McCrossan Mar 23 '17 at 08:38
  • i had taken in this way but yet its not working – abc Mar 23 '17 at 08:39
  • Same behavior in a different browser? – Václav Struhár Mar 23 '17 at 08:40
  • Possible duplicate of [Disable browser 'Save Password' functionality](http://stackoverflow.com/questions/32369/disable-browser-save-password-functionality) – Alessandro Mar 23 '17 at 08:45
  • You can try '$("#txtpassword").val('');' when document is ready. Or related to this http://stackoverflow.com/questions/13329056/how-to-clear-server-textbox-using-jquery – c.k Mar 23 '17 at 08:56
  • This Link may be help full [Entity Framework query slow, but same SQL in SqlQuery is fast](http://stackoverflow.com/questions/15767803/entity-framework-query-slow-but-same-sql-in-sqlquery-is-fast) – Abinash Mar 23 '17 at 11:42
  • @abc Sounds like the browser is saving the password. If you did not put code to do that, then try running it in different browsers and see if you get same results. – jmag Mar 23 '17 at 12:41
  • then how to clear that problem because i need to clear that after getting logged out and before login – abc Mar 23 '17 at 16:41

0 Answers0