I have a simple Data Entry form that User enters some information....One of these fields is a password field...Now i have a textBox and and the TextMode is set to Password...but I am unable to save the password to the database cause when i check a check box who's AutoPostBack is set to true the text in textbox with its text mode set to password just goes back to being blank when the page reloads....I dont understand why...I am using ASP.Net 1.1 VS 03 and Sql Backend......I just want to be able to save my Passwords to the DB so that the user will be able to log in and I can authenicate him..........
More then likely you are blanking it in the Page_Load()
Ensure you have a:
If Not IsPostBack() then
... clear password
End if
I thought that but when I change the text mode to Single line...it works just fine....
I've seen the same behavior. I believe this is a security feature. You can use the following approach to work around it.
PrivateSub Page_PreRender(ByVal senderAsObject,ByVal eAs System.EventArgs)HandlesMyBase.PreRender
Password.Attributes.Add(
"value", Password.Text)
ConfirmPassword.Attributes.Add(
"value", ConfirmPassword.Text)EndSub
0 comments:
Post a Comment