RadButton and ChangePassword Control Problem

3 posts, 1 answers
  1. big-O
    big-O avatar
    8 posts
    Member since:
    Jun 2010

    Posted 07 Dec 2011 Link to this post

    I uses RadButton in asp.net ChangePassword Control.
    Here is my code

      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
        <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="Panel1">
            <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
          </telerik:AjaxSetting>
        </AjaxSettings>
        <ClientEvents OnRequestStart="RequestStartHandler" OnResponseEnd="ResponseEndHandler" />
      </telerik:RadAjaxManager>
      <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista" />
      
    <asp:Panel ID="Panel1" runat="server">
      <asp:ChangePassword ID="ChangePassword1" runat="server" Width="231px" OnChangedPassword="ChangePassword1_ChangedPassword" ContinueDestinationPageUrl="~/ChangePassword.aspx" ChangePasswordFailureText="Password incorrect.">
                                  <ChangePasswordTemplate>
                                    <div id="div1" runat="server" style="height:16px;">
                                       <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">Current Password:</asp:Label>
                                    </div>
                                    <div id="div2" runat="server" style="height:27px;">
                                       <asp:TextBox ID="CurrentPassword" runat="server" Font-Size="12px" Width="192px" MaxLength="125" TextMode="Password" onKeyDown="return disable_sp(event);" onKeyPress="return disable_sp(event);"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="rfvCurrentPwd" runat="server" 
                                            ControlToValidate="CurrentPassword" ErrorMessage="<img src='App_Themes/Images/note.png'/>" 
                                            ToolTip="This field is required." ValidationGroup="ChangePassword">
                                       </asp:RequiredFieldValidator>
                                    </div>
                                    <div id="div3" runat="server" style="height:16px;">
                                       <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">New Password:</asp:Label>
                                    </div>
                                    <div id="div4" runat="server" style="height:16px; color: #cc0f16;">
                                       A minimum length of <%= Membership.MinRequiredPasswordLength %> characters.
                                       <asp:RegularExpressionValidator ID="valPwd" runat="server" 
                                            ControlToValidate="NewPassword"
                                            ErrorMessage="<img src='App_Themes/Images/note.png' alt='' />" 
                                            ValidationExpression=".{4}.*"
                                            ValidationGroup="ChangePassword">
                                       </asp:RegularExpressionValidator>
                                    </div>
                                    <div id="div5" runat="server" style="height:27px;">
                                       <asp:TextBox ID="NewPassword" runat="server" Font-Size="12px" Width="192px" MaxLength="125" TextMode="Password" onKeyDown="return disable_sp(event);" onKeyPress="return disable_sp(event);"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="rfvNewPwd" runat="server" 
                                            ControlToValidate="NewPassword" ErrorMessage="<img src='App_Themes/Images/note.png'/>" 
                                            ToolTip="This field is required." ValidationGroup="ChangePassword">
                                       </asp:RequiredFieldValidator>                                                
                                    </div>
                                    <div id="div6" runat="server" style="height:16px;">
                                       <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">Confirm New Password:</asp:Label>
                                    </div>
                                    <div id="div7" runat="server" style="height:24px; padding-bottom:2px;">
                                       <asp:TextBox ID="ConfirmNewPassword" runat="server" Font-Size="12px" Width="192px" MaxLength="125" TextMode="Password" onKeyDown="return disable_sp(event);" onKeyPress="return disable_sp(event);"></asp:TextBox>
                                       <asp:RequiredFieldValidator ID="rfvConfirmNewPwd" runat="server" 
                                            ControlToValidate="ConfirmNewPassword" 
                                            ErrorMessage="<img src='App_Themes/Images/note.png'/>" 
                                            ToolTip="This field is required." ValidationGroup="ChangePassword">
                                       </asp:RequiredFieldValidator>
                                    </div>
                                    <div id="div8" runat="server" style="color:#ff0000;">
                                       <asp:CompareValidator ID="NewPasswordCompare" runat="server" Display="Dynamic"
                                            ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword" 
                                            ErrorMessage="New password and confirm new password mismatch."
                                            ValidationGroup="ChangePassword">
                                       </asp:CompareValidator>
                                    </div>
                                    <div id="div9" runat="server" style="height:27px; padding-top:4px;">
                                       <telerik:RadButton ID="btnChangePassword" runat="server" ButtonType="LinkButton" Text="Submit" CommandName="ChangePassword" ValidationGroup="ChangePassword"></telerik:RadButton>
                                       <telerik:RadButton ID="btnCancel" runat="server" ButtonType="LinkButton" Text="Cancel" CommandName="Cancel" CausesValidation="False"></telerik:RadButton>
                                    </div>
                                    <div id="div10" runat="server" style="color:#ff0000;">
                                       <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                    </div>
                                  </ChangePasswordTemplate>
                                  <SuccessTemplate>
                                    <table cellpadding="0" cellspacing="0" style="width:100%; height:175px;">
                                      <tr><td valign="top" align="left"><telerik:RadButton ID="btnContinue" runat="server" ButtonType="LinkButton" Text="Continue" CommandName="Continue"></telerik:RadButton></td></tr>
                                    </table>
                                  </SuccessTemplate>
                                </asp:ChangePassword>
    </asp:Panel>

    I got Error: 'undefined' is null or not an object' in IE after the page Postback.
    This problem come from RadAjaxManager and RadButton.
    I set UseSubmitBehavior="false" but the error still occur.
    How to solve this problem, please help.

    p.s. I use RadControls for ASP.NET AJAX 2010 Q3

    Please help.
    Thank you

  2. big-O
    big-O avatar
    8 posts
    Member since:
    Jun 2010

    Posted 08 Dec 2011 Link to this post

    no answer...
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Slav
    Admin
    Slav avatar
    1356 posts

    Posted 12 Dec 2011 Link to this post

    Hello Prat,

    Note that the ChangePassword control isn't compatible with partial-page updates, and is therefore not designed to work inside an UpdatePanel control, as stated in the section Controls that Are Not Compatible with UpdatePanel Controls of the UpdatePanel Control Overview article.

    Since the RadAjax controls, including the RadAjaxManager are using update panels in order to initiate the Ajax updates, the controls listed in the article linked above aren't supported in this case as well. You could either implement your custom login mechanism or remove the ajaxification from the ChangePassword control.

    Best wishes,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top