Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Textbox Bug? (http://www.velocityreviews.com/forums/t73637-textbox-bug.html)

02-20-2004 09:13 PM

Textbox Bug?
 
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





Teemu Keiski 02-21-2004 01:15 PM

Re: Textbox Bug?
 
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 news:OJVsG4%239DHA.684@TK2MSFTNGP10.phx.gbl...
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






Alvin Bruney [MVP] 03-02-2004 06:32 AM

Re: Textbox Bug?
 
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
<kt> wrote in message news:OJVsG4%239DHA.684@TK2MSFTNGP10.phx.gbl...
> 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
>
>
>
>




sharpeffect 09-25-2008 07:43 AM

Work around for assigning Text to TextBox while its in Password Mode
 
Quote:

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
Hi,
You can do the following to programmatically assign values to TextBox while it is in Password Mode.

TextBoxPassword.Attributes.Add("value", "blablabla");

Where TextBoxPassword is the name of that textbox which is in Password Mode. and "blablabla" is the text you are going to assign to it.

To download the fully functional control and more detail you can visit following link at code project.
http://www.codeproject.com/KB/webfor...from_code.aspx

Comments and suggestions are welcomed.


All times are GMT. The time now is 10:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57