Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Password dilema

Thread Tools

Password dilema

Anita C
Posts: n/a
I have a webform, with 2 textboxes(set to singleline mode) and a submit
button. The text in the textboxes is populated on pageload on a function
call which retrieve the text as an e.g as follows from an xml
documentrotected void RetrievePassword(TextBox txtPassword, int nodeIndex)
//retrieve value to txtPassword
XmlNodeList passwordNodeList =
XmlNode password = passwordNodeList.Item(nodeIndex);
txtPassword.Text = password.Value.ToString();

If updated and the submit button is clicked the foll. code is executed to
update the password in the xml document: XmlNodeList passwordNodeList =
XmlNode password = passwordNodeList.Item(nodeIndex);
password.Value = txtPassword.Text;

The problem with the above is that the password appears in clear text. Is
there a way of displaying the text typed into txtPassword as "****" when the
value is read as say "abc" ? How can the 'value of the textbox be set and
inside which function?
What property of the txtPassword should I set to achieve the above.
What code should I change in the above 2 functions so that instead of the
text of txtPassword it's 'value' is used to retrieve and update?
I don't want to set the textmode to Password as I want the password to be
remembered enough to be updated in the xml doc. and also when retrieved
would like to see a visual indication such as*** instead of a blank textbox.
Any help will be greatly appreciated.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet - Intranet Data Dilema asdf ASP .Net 5 02-10-2006 04:07 PM
A hell of a dilema Mike Digital Photography 25 11-21-2004 06:09 PM
Re: Dilema 3991 Richard C. DVD Video 4 06-20-2004 03:00 AM
Dilema 9900 Digital Photography 0 06-17-2004 04:13 PM
Dilema FujiFilm FinePix S304 ??????????????? Krkec Digital Photography 3 08-24-2003 10:33 PM