Solved

Bind to Password Textbox

Posted on 2006-10-26
7
1,099 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:strickdd
  • 3
  • 2
7 Comments
 
LVL 11

Expert Comment

by:TornadoV
ID: 17812455
For security reason, TextBox with TextMode="Password" setting cannot be assigned or populated via the Text property on Page_Load or PostBack event.

Also, TextMode = "Password" can only be set @ design time.

You have a couple fo options if you're using AspNetSqlMembershipProvider.  Perhaps you can utilize password retrieve/reset options: http://www.qualitydata.com/products/aspnet-membership/help/configuration/asp-net-sql-membership-password-administration.aspx

Here are couple of other links:
http://forums.asp.net/thread/1412114.aspx
http://www.odetocode.com/Articles/427.aspx

Hope this helps.
0
 
LVL 28

Author Comment

by:strickdd
ID: 17812492
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.
0
 
LVL 11

Expert Comment

by:TornadoV
ID: 17812534
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 28

Author Comment

by:strickdd
ID: 17812562
I wasn't able to find the control or the value in the control when i viewed the source
0
 
LVL 11

Expert Comment

by:TornadoV
ID: 17812594
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.:)
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 17929893
PAQd, 500 points refunded.

DarthMod
CS Moderator
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now