gjones
gjones

Reputation: 81

ASP ChangePassword control changepasswordfailuretext does not show

I'm using the ASP ChangePassword control. When a user fails to enter their current password correctly I just get a control refresh with all fields cleared, not the changepasswordfailuretext. Googled this and found that you should use ChangePasswordError method to catch this. I put a breakpoint in this method and did not get stop here when the current password was incorrect.

How do I show my users that they have entered their current password incorrectly?

Upvotes: 0

Views: 780

Answers (1)

LouD
LouD

Reputation: 3844

Just ran into this myself and found an answer. If you are customizing the display using ChangePasswordTemplate and SuccessTemplate, you also need to add a control with the id "FailureText". This control gets populated with your configured message in the event of an error:

<asp:Literal ID="FailureText" runat="server" />

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.changepassword.changepasswordtemplate.aspx

Upvotes: 1

Related Questions