A
Anita C
Hi,
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
document
rotected void RetrievePassword(TextBox txtPassword, int nodeIndex)
//retrieve value to txtPassword
XmlNodeList passwordNodeList =
xmlDocument.SelectNodes("/SERVERS/SERVER/@PASSWORD");
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 =
xmlDocument.SelectNodes("/SERVERS/SERVER/@PASSWORD");
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.
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
document
//retrieve value to txtPassword
XmlNodeList passwordNodeList =
xmlDocument.SelectNodes("/SERVERS/SERVER/@PASSWORD");
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 =
xmlDocument.SelectNodes("/SERVERS/SERVER/@PASSWORD");
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.