Click here to Skip to main content
16,017,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
hello,
i use asp.net membership change password in update panel,
when i fill textbox and click in submit button my texbox was reset and empty and show RequiredFieldValidator error,

please enter password
please enter new password
please enter confirm new password

and don't show any message for password change success,
i want when i click the button updProgress is show, and show correct error

my code is :
ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
   <asp:UpdateProgress ID="updProgress" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
       <ProgressTemplate>
           <img src="../Static/Css/Images/loading.gif" />
           now connecting to the server ...
       </ProgressTemplate>
   </asp:UpdateProgress>
   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <Triggers>
           <asp:AsyncPostBackTrigger runat="server" ControlID="ChangePasswordPushButton" />
       </Triggers>
       <ContentTemplate>
           <asp:ChangePassword ID="ChangePassword1" runat="server" ChangePasswordButtonText="change your password" CancelButtonText="cancel" ChangePasswordTitleText="change your password" ConfirmNewPasswordLabelText="conferm your password" ConfirmPasswordCompareErrorMessage="the new password same must be the conferm password." ConfirmPasswordRequiredErrorMessage="please enter your conferm password." NewPasswordLabelText="new password:" NewPasswordRegularExpressionErrorMessage="the new password in not accept.please change your password" NewPasswordRequiredErrorMessage="type the new password." PasswordLabelText="last password:" PasswordRequiredErrorMessage="type new password." SuccessText="your password changed successfuly." UserNameLabelText="user name:" UserNameRequiredErrorMessage="please type your user name." ChangePasswordFailureText="the last password or the new passwor is not corrent.password must be {0} character and {1}. ">
               <ChangePasswordTemplate>
                   <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                       <tr>
                           <td>
                               <table cellpadding="0">
                                   <tr>
                                       <td align="center" colspan="2">change your password</td>
                                   </tr>

                                   <tr>
                                       <td align="right">
                                           <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">last password:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
                                           <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword" ErrorMessage="please enter password." ToolTip="please enter password." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td align="right">
                                           <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">new password:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="NewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                           <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword" ErrorMessage="please enter new password" ToolTip="please enter new password" ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td align="right">
                                           <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">conferm the passwordد:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox>
                                           <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword" ErrorMessage="please enter confirm new password" ToolTip="please enter confirm new password." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td align="center" colspan="2" style="color: Red;">
                                           <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td align="center" colspan="2">
                                           <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="t" ValidationGroup="ChangePassword1"></asp:CompareValidator>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td align="right">
                                           <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="ChangePassword1" DisplayMode="List" />
                                       </td>
                           </td>
                           <td>
                               <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="cancle" UseSubmitBehavior="False" ValidationGroup="ChangePassword1" />
                           </td>
                       </tr>
                       <td>
                       </tr>
                   </table>
                   </td>
                                                   </tr>
                                               </table>
               </ChangePasswordTemplate>
               <SuccessTextStyle ForeColor="#66FF33" />
           </asp:ChangePassword>
       </ContentTemplate>
   </asp:UpdatePanel>
   <asp:UpdatePanel ID="UpdatePanel2" runat="server">
       <ContentTemplate>
           <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="change your password" UseSubmitBehavior="False" ValidationGroup="ChangePassword1" />
       </ContentTemplate>
   </asp:UpdatePanel>
Posted
Updated 30-Aug-13 21:27pm
v2
Comments
SadeqHatami 31-Aug-13 8:19am    
no any body for help me?

1 solution

try by removing update panel from code
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900