About TextMode = Password

A

Ather Ali Shaikh

Hello
I have a control TextBox with TextMode = Password fine.
I am suppose to save LoginID and Password in a cookie fine.
But when I read the cookie and display the key/values of the LoginID and
Password
then the Password field box is not showing the masked chars. nor display any
thing. but in behind tit exist and login sucessfully.

What to do to display the masked chars int he password field box.

Regards
Ather
 
S

Steve C. Orr [MVP, MCSD]

Sending the password in plain text to the browser is a bad idea from a
security standpoint so the default security settings discourage it.
(Anybody can do a view source for the page
and see the password)

However there is a workaround if you're determined. You can set the
password text via client side script.
Here's the simplest example I've seen:

MyPWTextBox.Attributes.Add("value", strPassword)

This server side code outputs the needed client side code
 

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top