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

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

Ken Cox [Microsoft MVP]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top