Vanwege onderhoudswerkzaamheden die uw ervaring zouden moeten verbeteren, heeft deze website beperkte functionaliteit. Als een artikel uw probleem niet verhelpt en u een vraag wilt stellen, kan onze ondersteuningsgemeenschap u helpen in @FirefoxSupport op Twitter en /r/firefox op Reddit.

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Disable Save Password Prompt in firefox (v.61) from aspx (autocomplete="off" not working)

  • 2 antwoorden
  • 1 heeft dit probleem
  • 2 weergaven
  • Laatste antwoord van cor-el

more options

I want to disable the Save Password Prompt in firefox in my login aspx page (not directly by changing the settings in firefox). I have used autocomplete="off", it works in IE and chorme but not in firefox. Can you please provide me a solution. Below is my simple login aspx :

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .auto-style4 {
            width: 400px;
        }
        .auto-style6 {
            width: 140px;
        }
        .auto-style7 {
            text-align: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="center" class="auto-style4">
        <tr>
            <td class="auto-style7" colspan="2">LOGIN</td>
        </tr>
        <tr>
            <td class="auto-style6">Customer Id</td>
            <td>
                <asp:TextBox ID="txtUsername" runat="server" autocomplete="off"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style6">Password</td>
            <td>
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" autocomplete="off"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="auto-style6">&nbsp;</td>
            <td>
                <asp:Button ID="btnSubmitLogin" runat="server" OnClick="btnSubmitLogin_Click" Text="Login" />
            </td>
        </tr>
        <tr>
            <td style="align-content:center">
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
I want to disable the Save Password Prompt in firefox in my login aspx page (not directly by changing the settings in firefox). I have used autocomplete="off", it works in IE and chorme but not in firefox. Can you please provide me a solution. Below is my simple login aspx : <pre><nowiki><%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <style type="text/css"> .auto-style4 { width: 400px; } .auto-style6 { width: 140px; } .auto-style7 { text-align: center; } </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table align="center" class="auto-style4"> <tr> <td class="auto-style7" colspan="2">LOGIN</td> </tr> <tr> <td class="auto-style6">Customer Id</td> <td> <asp:TextBox ID="txtUsername" runat="server" autocomplete="off"></asp:TextBox> </td> </tr> <tr> <td class="auto-style6">Password</td> <td> <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" autocomplete="off"></asp:TextBox> </td> </tr> <tr> <td class="auto-style6">&nbsp;</td> <td> <asp:Button ID="btnSubmitLogin" runat="server" OnClick="btnSubmitLogin_Click" Text="Login" /> </td> </tr> <tr> <td style="align-content:center"> <asp:Label ID="lblMessage" runat="server"></asp:Label> </td> </tr> </table> </asp:Content></nowiki></pre>

Bewerkt door cor-el op

Alle antwoorden (2)

more options

Sorry, this isn't the best site for posting code... can you edit your question (there may be a link on the right side of it) and use pre tags around the code block? Also, please provide the code that is served to the browser (use right-click > View Page Source in Firefox), because we are not always familiar with how .Net code renders to the client.

More generally, Firefox ignores autocomplete="off" on username and password fields, according to:

https://developer.mozilla.org/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields

more options

I've placed the code in PRE tags (remember that this forum includes a separate DIV.content-raw with the raw code)


There is a pref (signon.storeWhenAutocompleteOff) that can be changed to make Firefox honor autocomplete="off", but you can't affect this via code in the website. The only way would be to code the form in such a way that Firefox doesn't recognize it as a login form, bit I don't know how to do this. We sometimes get a question where the Firefox Password Manager isn't triggered by the login form for some reason.