textbox and password type input

J

Jason

Hello!

just would like to know. when i set an ASP textbox control to be of input
type password, i can't do a "txtPassword.Text = "value"". when the page
renders the control just appears empty. why would that be? is this by
design? how would i get passed this, cause i do need to populate that box
with a value?

Thanks
Jason
 
M

Marina

It is by design, for security reasons - so that the password is not in the
HTML in plain text.

Now, you could write out javascript to set the value property of the textbox
on the client, of course this would still mean that you have the password in
plain text in the HTML.
 
B

bruce barker

its by design. to set the value, use attributes.

txtPassword.Attributes["value"]="password";

-- bruce (sqlwork.com)
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top