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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top