<asp:textbox TextMode=Password runa=server> ??

Discussion in 'ASP .Net' started by Kerri, Aug 11, 2003.

  1. Kerri

    Kerri Guest

    Hi,

    I have an asp textbox that allows users to enter their
    password.

    I have another page that allows a user to edit their user
    account.

    On this page I set the text to be the password in the
    Database. There is a value in my datareader but yet on my
    aspx my textbox is empty.

    This only happens for this Text box as the TextMode is
    set to Password.

    Any ideas?

    Thanks,
    K.
     
    Kerri, Aug 11, 2003
    #1
    1. Advertising

  2. Here's a little workaround. Since the ASP.NET server control doesn't want to
    add/display the value in a password textbox, you have to add it yourself using
    an attribute. TextBox1 is a password textbox.

    Private Sub Page_Load _
    (ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    TextBox1.Attributes.Add("value", "thePassword")
    End Sub


    <asp:textbox id="TextBox1" runat="server"
    textmode="Password"></asp:textbox></p>


    Does this help?

    Ken
    MVP [ASP.NET]

    "Kerri" <> wrote in message
    news:025601c35f96$6674f560$...
    Hi,

    I have an asp textbox that allows users to enter their
    password.

    I have another page that allows a user to edit their user
    account.

    On this page I set the text to be the password in the
    Database. There is a value in my datareader but yet on my
    aspx my textbox is empty.

    This only happens for this Text box as the TextMode is
    set to Password.

    Any ideas?

    Thanks,
    K.
     
    Ken Cox [Microsoft MVP], Aug 11, 2003
    #2
    1. Advertising

  3. Kerri

    Kerri Guest

    Below worked.

    Thanks for your rely.
    >-----Original Message-----
    >Here's a little workaround. Since the ASP.NET server

    control doesn't want to
    >add/display the value in a password textbox, you have to

    add it yourself using
    >an attribute. TextBox1 is a password textbox.
    >
    > Private Sub Page_Load _
    > (ByVal sender As System.Object, _
    > ByVal e As System.EventArgs) _
    > Handles MyBase.Load
    > TextBox1.Attributes.Add("value", "thePassword")
    > End Sub
    >
    >
    > <asp:textbox id="TextBox1" runat="server"
    >textmode="Password"></asp:textbox></p>
    >
    >
    >Does this help?
    >
    >Ken
    >MVP [ASP.NET]
    >
    >"Kerri" <> wrote in message
    >news:025601c35f96$6674f560$...
    >Hi,
    >
    >I have an asp textbox that allows users to enter their
    >password.
    >
    >I have another page that allows a user to edit their user
    >account.
    >
    >On this page I set the text to be the password in the
    >Database. There is a value in my datareader but yet on my
    >aspx my textbox is empty.
    >
    >This only happens for this Text box as the TextMode is
    >set to Password.
    >
    >Any ideas?
    >
    >Thanks,
    >K.
    >
    >
    >.
    >
     
    Kerri, Aug 11, 2003
    #3
    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. Alex
    Replies:
    1
    Views:
    555
    Colt [MVP]
    Jul 11, 2003
  2. Kumar

    asp:TextBox TextMode='Password'

    Kumar, Jul 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    644
    Kumar
    Jul 12, 2003
  3. Jonathan Dienst

    Problem with Password TextMode

    Jonathan Dienst, Nov 16, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    4,531
    Steve C. Orr [MVP, MCSD]
    Nov 17, 2003
  4. Ather Ali Shaikh

    About TextMode = Password

    Ather Ali Shaikh, Dec 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,131
    Steve C. Orr [MVP, MCSD]
    Dec 28, 2003
  5. paul reed

    Password TextMode for TextBox

    paul reed, Apr 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    355
    Paul Reed
    Apr 5, 2004
Loading...

Share This Page