password text box

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

When I try to read the text in a password text box, I get an empty
string........

code behind...

MyPassword = PasswordTextBox.Text always returns an empty string.....

What am I missing? Thanks.
 
I added a normal textbox (TextBox1) to a form & changed the password
character to an asterix.

I then used:

MessageBox.Show(TextBox1.Text)

This returned 'TextBox1' which is the default text, which I left as default

Although, if you want to uncover the password under the asterix's then
that's very easy too

I hope this has helped
 
That is crazy... I will be testing this.
in asp.net the line of code you have works fine
 
Dan said:
When I try to read the text in a password text box, I get an empty
string........

code behind...

MyPassword = PasswordTextBox.Text always returns an empty string.....

Web application or Windows Forms application?
 
Web application.....What I want to do is read the password at the
server.......
Thanks, Dan
 
I do want to uncover the actual password under the asterix at the server.

Did you also change the textbox TextMode to Password?

Thanks....Dan
 
Don't know where you put the Mesageboxshow code. When I place it in the code
behind in the Click event for the submit button, I get a "Messageboxshow is
not declared" error.
 

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