473,320 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Password Textboxes

I do something like this:

HttpCookie cookie = Request.Cookies[ "AuthInfo" ];

if( cookie != null )

{

tbUserName.Text = cookie.Values[ "UserName" ];

tbPassword.Text = cookie.Values[ "Password" ];

}

This works except tbPassword is a WebControls.TextBox and it's set to mode
"password". It doesn't display the circles indicating that it's got a
value - even though it does.

Anyone know a way to fix this?

Thanks

John.
Nov 17 '05 #1
1 1338
Hello John,

Actually this behaviour is good, there is nothing to be fixed. The password
is stored in the text property of the control but is not posted to the client.
Remember that this is a webcontrol, if the password was rendered in html,
the user will see some circles, but looking at the html source the value
would be writen in clear text and this is not secure.

There is no way to avoid this behaviour if you stick to the TextBox control.
You could change to an HtmlControl, maybe an HtmlInputText won't hide the
password, then you will see the circles but take a look at the html source
rendered to the client...

A workaround could be making your own TextBox control and post a default
value to the client (different to the password, like a series of white spaces,
question marks or wathever), that will mean to you that no change was done
on that field by the user.

regards,
-----
Ariel Popovsky
I do something like this:

HttpCookie cookie = Request.Cookies[ "AuthInfo" ];

if( cookie != null )

{

tbUserName.Text = cookie.Values[ "UserName" ];

tbPassword.Text = cookie.Values[ "Password" ];

}

This works except tbPassword is a WebControls.TextBox and it's set to
mode "password". It doesn't display the circles indicating that it's
got a value - even though it does.

Anyone know a way to fix this?

Thanks

John.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Homa | last post by:
Hi, I have a quick question. I have a webpage allow user to modify his/her information. When I generate the form, I want to pre-load the information to the TextBoxes. But for the password...
4
by: Jonathan Dienst | last post by:
I have a simple data access and administration page for user details on my site, including a login password -- but I cannot get the textbox to work properly if the TextMode is set to "Password". ...
2
by: Raghavendra V | last post by:
Hi all, I have a datagrid and textboxes as columns. But when i say the textbox property as PASSWORD the * (stars) does not display in the password text box at runtime. But when it is a normal...
1
by: Millhouse50 | last post by:
I am using ASP.NET 2.0 with C# and am having trouble with some textboxes. I have the textboxes set to password and have two setup so that I can validate the password. Now I need to get the password...
11
by: Kevin O'Brien | last post by:
Hello, I am creating a sign on screen for my application in which I want to store the username and password in a database table. I was thinking of putting a combo box connected to the database...
1
by: Nathan Sokalski | last post by:
I have a form that is being used to edit account information. The form contains username and password TextBoxes, for which I set Enabled=False. When I assign the Text property the previous value,...
3
by: rayapatilavakumar | last post by:
Hi all, i am doing one ASP.Net/C#.Net project in that i have designed one form,in that form i have 2 textboxes for username and password and one check box and one button.after entering the data into...
4
by: John Kotuby | last post by:
Hi all, I have a simple user-form which accepts contact and profile information for the user to edit and save. All the textboxes are working fine and displaying the expected data, both when the...
3
by: Nathan Sokalski | last post by:
I have an UpdatePanel that needs to maintain the value of several TextBoxes with TextMode=Password. Since the browser clears all password fields client-side, I obviously need to use JavaScript to...
1
by: HimanshuP | last post by:
I login to my product using "Username=user1" and "Password=password1". If I say browser to remember my password. Then Sometimes some textboxes in my product,I got default values as "user1" and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.