CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    231

    Autoforget password?

    As you probably know, Internet Explorer (and most other browsers) has an option to remember passwords.

    I want to make a login page that doesn't let the browser remember the passwords. Never, regardless the browser options. Any ideas how this can be done safely? I guess I can't use the textbox webcontrol with TextMode set to password anymore?

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Autoforget password?

    Not sure if this will help, but I do think so

    Perhaps if you make your form with autocomplete off.
    Autocomplete is the feature IE uses to remember your usernames and passwords, so if you type in your username, it automatically gives you the list of stuff you've entered previously, as wel as enter your password automatically. By turning it off, it won't be remembered.

    Try this :
    HTML Code:
    <form id="Form1" method="post" runat="server" autocomplete="off">
    To turn off auto-complete for one Textbox only:<asp:TextBox Runat="server" ID="Textbox1" autocomplete="off"></asp:TextBox>
    Or, At Runtime, you could use this :
    Code:
    Textbox1.Attributes.Add("autocomplete", "off");
    Try it, and see if this is what you're after

  3. #3
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Autoforget password?

    I doubt turning off autocomplete will help, because it isn't autocomplete as such when the browser asks if it should remember your password.
    Autocompletion is just the small "drop down list" suggestions when you type in text fields.

    I actually doubt you can do what you desire, because it is built in browser functionality and not a asp.net functionality. I've not tested it, but I do doubt it'll work.

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Autoforget password?

    Nice and simple answer...it can't be done, unless you want to make your own internet browser.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Aug 2006
    Posts
    231

    Re: Autoforget password?

    I thank you for your replies!

    Disabling autocomplete at least made the "remember password?"-dialog go away in IE 7.0! I don't know yet about other browsers...

  6. #6
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Autoforget password?

    If I remember correctly, It should work in FireFox as well

  7. #7
    Join Date
    May 2002
    Posts
    10,943

    Re: Autoforget password?

    Tools -> Options -> Security -> Uncheck "Remember passwords for sites"

    Just remember, this is only a browser by browser basis.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured