Textmode = Password

W

William Gower

I have a password mode field in a user record, when I go to fill the field
from an existing record I see nothing in the field, when I take the
textmode="password" off then I see the password

password.text = row("password")
 
T

Teemu Keiski

It is a security caution. In password mode TextBox is read-only (from
programmatic standpoint e.g it can be filled only by the user by typing)

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

I have a password mode field in a user record, when I go to fill the field
from an existing record I see nothing in the field, when I take the
textmode="password" off then I see the password

password.text = row("password")
 
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
 
G

grundt

You can get around the "read-only" limitation (which will cause the mask
characters to display) by:

password.Attributes.Add("value",row("password"))
 

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,822
Latest member
israfaceZa

Latest Threads

Top