strickdd
asked on
Bind to Password Textbox
I have a formview that I want a user to be able to update a password with. I want to bind the oringinal password to a textbox with the textmode set to password, but when I try this is doesn't bind. I have the textbox control below:
<asp:TextBox ID="PasswordTextBox" runat="server" Text='<%# Bind("Password") %>' TextMode="password" ReadOnly="true" />
Any ideas?
<asp:TextBox ID="PasswordTextBox" runat="server" Text='<%# Bind("Password") %>' TextMode="password" ReadOnly="true" />
Any ideas?
ASKER
I found a work around because I am NOT using ASP.Net security. What I ended up doing is binding to a textbox that I set the Visible property to false. It is not rendered clientside and the text cannot be viewed by the client, but it maintains the e.OldValues[] when Updating.
Good, keep in mind that hidden text box with password is still visible in the 'View Source'. I would at least use some kind of encryption.
ASKER
I wasn't able to find the control or the value in the control when i viewed the source
you're right, I got it confused with display:none, with Visible = false server side control is not rendered. My bad, it's too early for me.:)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, TextMode = "Password" can only be set @ design time.
You have a couple fo options if you're using AspNetSqlMembershipProvide
Here are couple of other links:
http://forums.asp.net/thread/1412114.aspx
http://www.odetocode.com/Articles/427.aspx
Hope this helps.