Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top