all groups > asp.net > january 2005 >
You're in the

asp.net

group:

Value property for password HTML server control


Value property for password HTML server control nzanella NO[at]SPAM cs.mun.ca
1/3/2005 11:34:30 PM
asp.net: Hello,

Normally default values for passwords are left unspecified. However, the
XHTML standard allows them for all I know, so I decided to try coding the
following ASP.NET HTML server control on the page I am writing for testing:

<input id="password" type="password" value="foo" runat="server" />

Much to my surprise, when the input element has the runat attribute as
described above, it seems like the ASP.NET Web Matrix server (or should
I say the ASP.NET application framework?) strips away the value field
from the HTML output.

Why is the value attribute being stripped off in the
output sent to the web browser?

Thanks,

RE: Value property for password HTML server control Prakash.NET
1/4/2005 12:33:02 AM
Hi,

I think it is a property of ASP.NET to strip off the values of password
field. When you type password in any form and the form is sent back to
browser and returns again, all the fields will be the same, but the password
field is stripped off.

Prakash.C

[quoted text, click to view]
Re: Value property for password HTML server control Scott Allen
1/4/2005 4:34:44 AM
It's a security feature to avoid putting a password in plain text where someone
could snoop it by viewing the html source...

--
Scott
http://www.OdeToCode.com/blogs/scott/

[quoted text, click to view]

AddThis Social Bookmark Button