Password dilema

Discussion in 'ASP .Net Web Controls' started by Anita C, Sep 26, 2003.

  1. Anita C

    Anita C Guest

    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:protected 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.
    Anita C, Sep 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. asdf

    Internet - Intranet Data Dilema

    asdf, Feb 9, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    363
  2. Replies:
    0
    Views:
    286
  3. ma740988

    implementation dilema

    ma740988, Jan 18, 2006, in forum: C++
    Replies:
    5
    Views:
    288
    Luke Meyers
    Jan 22, 2006
  4. shajnday
    Replies:
    0
    Views:
    459
    shajnday
    Sep 12, 2010
  5. jonefer

    Modal Popup Extender Dilema

    jonefer, Apr 18, 2008, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    211
    jonefer
    Apr 18, 2008
Loading...

Share This Page