Passoword not shown on Page Load

ashutosh9910

Freshman
Joined
May 13, 2005
Messages
44
Hi All,

A newbie to ASp.NET.

Today I just made a user management web site kinda thing. In this when I click on a link to edit prifile of a user, It opens up the page which is same as is used for adding a user with all the information filled up.

I can get all information from the database but not Password.

With the textmode of the textbox set to Password, it does not display the password as "*****" in the Password textbox.


Could someone tell me why is it so ?


Thanks in Advance
Ashutosh
 
Only thing I can think of is your dynamically changing the text mode and you're doing the change after the text box has fired it's events in which case the change won't take place right away.
 
bri189a said:
Only thing I can think of is your dynamically changing the text mode and you're doing the change after the text box has fired it's events in which case the change won't take place right away.


No I am not changing it dynamically. It is set to Password at the design time only and is nmot changed since then.

Meanwhile instead of
Visual Basic:
txtPassword.text = ds.Tables(0).Rows(0)(1)

If i say
Visual Basic:
txtPassword.Attributes.Add("Value",ds.Tables(0).Rows(0)(1))

It works fine.

Could not understand why is it so.


Ashutosh
 
I think it is .net security control.
I also face the same, but i don't think it is problem for me.
Because normally change password is another screen called: change password.

To change user profile information, you should not allow them to change password there.
 
Well it is a problem to me as I am using the same for Adding a user and for editing his information.

Also I am checking if all the mandatory information is supplied ( password is also a mandatory field) and so it creates problem at that time.



Ashutosh
 
You can do it this way:
If password field blank, then password remain no change. Otherwise, update the password.
 
bungpeng said:
You can do it this way:
If password field blank, then password remain no change. Otherwise, update the password.


That could be a possible error in case of adding a new user as it would allow using Blank Password.


Ashutosh
 
Back
Top