Textbox Bug?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Weird Bug..
I am trying to execute this code, essentially a few fields to update a
custom user login / info form values from DB
This code works;
txtUsername.Text = userReader.Item("username")
txtPassword.Text = userReader.Item("Password")
However, it displays the password of the user. I want to mask it with the
password char format. So I add the line of code / or (set the textbox mode
in properties)
txtPassword.TextMode = TextBoxMode.Password.
The text disappears, blank box , no *** chars , nothing visible or
selectable in the box. However, adding debug code says there is something in
the box, and it has a len().....??? Invisible, non-selectable text?
I tried this on several machines with the same results..
Whats up Microsoft?? Thanks..
KT
 
Basically the Text is there in Text property, but in TextBox with Password
mode, it won't render the Value attribute. it will with all other modes.
That's how it works. Security stuff, I believe.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


<kt> wrote in message Weird Bug..
I am trying to execute this code, essentially a few fields to update a
custom user login / info form values from DB
This code works;
txtUsername.Text = userReader.Item("username")
txtPassword.Text = userReader.Item("Password")
However, it displays the password of the user. I want to mask it with the
password char format. So I add the line of code / or (set the textbox mode
in properties)
txtPassword.TextMode = TextBoxMode.Password.
The text disappears, blank box , no *** chars , nothing visible or
selectable in the box. However, adding debug code says there is something in
the box, and it has a len().....??? Invisible, non-selectable text?
I tried this on several machines with the same results..
Whats up Microsoft?? Thanks..
KT
 
Back
Top