Password TextBox loses value

B

Bhagya

I am doing client side validation in my page. The password field does
not retain its value.
Pls help
 
H

Hans Kesting

I am doing client side validation in my page. The password field does
not retain its value.
Pls help

By design (for security reasons) the value of the password textbox can
not be set from the server-side.
This includes postback situations.

Hans Kesting
 
E

Edwin Knoppert

Nope, it's a client issue, not server :)



Hans Kesting said:
By design (for security reasons) the value of the password textbox can not
be set from the server-side.
This includes postback situations.

Hans Kesting
 
M

Mark Rae

By design (for security reasons) the value of the password textbox can not
be set from the server-side.
This includes postback situations.

??? Of course it can!

txtPassword.Attributes.Add("value", txtPassword.Text);
 
J

Just D.

This is not correct. I'm doing that setting the password field on the server
side for the Debug Mode to avoid entering these strings each time when I
start the app to debug it.

But the problem is when it requires a postback it loses the value, that's
different, and I switch this text box mode to the regular mode before I do
that so that the client never notices it.

Just D.
 
M

Mark Rae

But the problem is when it requires a postback it loses the value, that's
different, and I switch this text box mode to the regular mode before I do
that so that the client never notices it.

Just D.
 
M

Mark Rae

But the problem is when it requires a postback it loses the value, that's
different, and I switch this text box mode to the regular mode before I do
that so that the client never notices it.

No need to to that...

txtPassword.Attributes.Add("value", txtPassword.Text);
 
E

Edwin Knoppert

Seeing the responses over here.. i was really convinced this was a browser
issue.
In MSIE it seems the file upload control can not be preset.
Afaik the textbox with password setting either.
Seems i was wrong (not tested though)

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top