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

  • Thread starter Thread starter Kerri
  • Start date Start date
K

Kerri

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.
 
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]

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.
 
Back
Top