Saturday, March 24, 2012

Windows Autocomplete

Is there a way of switching off the windows box that appears when a user types a password:

Windows displays the following message:

"Do you want windows to remember this password, so that you dont have to type it again the next time you visit this page?"

Can I turn this off so that anyone accessing my project from any computer will not get this message or is it set by each user?add
AUTOCOMPLETE = "off" to your input tag.
Being a newcomer to ASP.Net, where is the input tag?

This is where I declare my button - should I add it here somewhere?


<asp:button id="btnGo" style="LEFT: 50%; POSITION: absolute; TOP: 80%" runat="server" Width="20%" Height="10%" Text="Go >" ></asp:button>

The Web Control equivalent of the Input Text control, is:

<asp:Textbox id="TextBox1" runat="server" <and more properties>></asp:Textbox>

What you mean with your second question will have to be clarified. At least I do not understand what you mean.
your input tag is generated by a Textbox control

the textbox control has an Attributes collection

you need to add a new attribute "AUTOCOMPLETE" with a value of "off"
This is what I have added:


<asp:textbox id="txtPassword" style="LEFT: 30%; POSITION: absolute; TOP: 50%" runat="server" Width="40%" Height="10%" AUTOCOMPLETE = "off" TextMode="Password"></asp:textbox>

But I am getting an error "Could not find any attribute 'AUTOCOMPLETE' of element textbox"
You need to add this programmatically, e.g. in Page_Load():


txtPassword.Attributes.Add("AUTOCOMPLETE", "off")

0 comments:

Post a Comment