Password TextBox - Can't Seem To Set It Programatically So ***** Shows

  • Thread starter Thread starter Empire City
  • Start date Start date
E

Empire City

asp:TextBox textmode = "Password" id = "myPasswordTextBox"

myPasswordTextBox.Text = "foo";

This does not set the text box. It remains empty. I want *** to appear in
the text box. Can this be done with the asp TextBox?
 
Has the password control got a 1 to 1 mapping of typed chars and *'s ?

Is there a way to make this different than 1:1?
 
Has the password control got a 1 to 1 mapping of typed chars and *'s ?
Is there a way to make this different than 1:1?

When I type foo in the text box *** appears, so it's a 1 to 1 mapping of
character to * I'm not sure if this is your question. I can see the actual
password in the TextBox.Text property in the debugger but it doesn't show up
on the screen.

I tried setting the TextBox.TextMode to SingleLine, setting the
TextText.Text to the password and then setting the TextMode back to
Password, but still nothing in the display.

I'm starting to think the asp:textbox may not have this functionality and
I'll have to come up with some sort of workaround if I could think of one.
 

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

Back
Top