Value property for password HTML server control

N

Neil Zanella

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,

Neil
 
G

Guest

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
 
S

Scott Allen

It's a security feature to avoid putting a password in plain text where someone
could snoop it by viewing the html source...
 

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,792
Messages
2,569,639
Members
45,351
Latest member
RoxiePulli

Latest Threads

Top