CipherIS
asked on
ASP.NET Textbox Prob on AutoPostback
I have an ASP.NET page with four textboxes.
First two are FirstName and LastName. The values are populated from the database.
The next two are Password and ConfirmPassword. When I enter a value in the Password text box and click on the submit button the value disappears from the Password textbox.
Any idea how to resolve?
First two are FirstName and LastName. The values are populated from the database.
The next two are Password and ConfirmPassword. When I enter a value in the Password text box and click on the submit button the value disappears from the Password textbox.
Any idea how to resolve?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
the issue is i have not identified the textbox as a password yet. I am testing it and exposing the text being typed. It disappears as soon as i click on the submit button and the value = "".
ASKER
below does not work
TextBox1.Attributes.Add("o nkeydown", "return (event.keyCode!=13);");
TextBox1.Attributes.Add("o
ASKER
I figured it out. It was a coding issue. On the load event I was setting the value = string.empty.
ASKER
Figured it out
<asp:TextBox ID="TextBox1" runat="server"
onkeydown = "return (event.keyCode!=13);" >
</asp:TextBox>
You can also do codebehind like this if using c#
TextBox1.Attributes.Add("o