Groups | Blog | Home
all groups > c# > march 2007 >

c# : keep password's content


Monica
3/10/2007 9:38:08 PM
Dear reader,

how can I keep my password content when a postback occur?

I define an edit box in password textmode. but when a postback occur and my
page became refresh, its content would be empty. and I have to enter again.

what is the best solution to solve this problem?

Regards,
Göran Andersson
3/11/2007 12:00:00 AM
[quoted text, click to view]

It is not possible to keep the value in a password field. The browser
will not let you set the value of a password field.

--
Göran Andersson
_____
Peter Bromberg [C# MVP]
3/11/2007 4:29:03 PM
Try saving it in a cookie. Read the cookie when the page loads and see if it
is not null. If so, use it to restore the value the user typed.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




[quoted text, click to view]
AddThis Social Bookmark Button