This is a migrated thread and some comments may be shown as answers.

RadButton and ChangePassword Control Problem

2 Answers 106 Views
Button
This is a migrated thread and some comments may be shown as answers.
big-O
Top achievements
Rank 1
big-O asked on 07 Dec 2011, 06:01 PM

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 Answers, 1 is accepted

Sort by
0
big-O
Top achievements
Rank 1
answered on 08 Dec 2011, 05:08 PM
no answer...
0
Accepted
Slav
Telerik team
answered on 12 Dec 2011, 12:18 PM
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
Tags
Button
Asked by
big-O
Top achievements
Rank 1
Answers by
big-O
Top achievements
Rank 1
Slav
Telerik team
Share this question
or