Hello!
just would like to know. when i set an ASP textbox control to be of input
type password, i can't do a "txtPassword.Text = "value"". when the page
renders the control just appears empty. why would that be? is this by
design? how would i get passed this, cause i do need to populate that box
with a value?
Thanks
JasonIt is by design, for security reasons - so that the password is not in the
HTML in plain text.
Now, you could write out javascript to set the value property of the textbox
on the client, of course this would still mean that you have the password in
plain text in the HTML.
"Jason" <c_bananas@.mighty.co.za> wrote in message
news:el9It5l6DHA.632@.TK2MSFTNGP12.phx.gbl...
> Hello!
> just would like to know. when i set an ASP textbox control to be of input
> type password, i can't do a "txtPassword.Text = "value"". when the page
> renders the control just appears empty. why would that be? is this by
> design? how would i get passed this, cause i do need to populate that box
> with a value?
> Thanks
> Jason
its by design. to set the value, use attributes.
txtPassword.Attributes["value"]="password";
-- bruce (sqlwork.com)
"Jason" <c_bananas@.mighty.co.za> wrote in message
news:el9It5l6DHA.632@.TK2MSFTNGP12.phx.gbl...
> Hello!
> just would like to know. when i set an ASP textbox control to be of input
> type password, i can't do a "txtPassword.Text = "value"". when the page
> renders the control just appears empty. why would that be? is this by
> design? how would i get passed this, cause i do need to populate that box
> with a value?
> Thanks
> Jason
0 comments:
Post a Comment