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

TabStrip wtih MultiPage Stops working after AJAX Fires on asp:Button

5 Answers 74 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
James Wink
Top achievements
Rank 1
James Wink asked on 21 Jul 2011, 10:29 PM

I have a Tab with 2 panels.  And a Multipage control with 2 pageviews.  Each page view has a asp:button on it that I use AJAX to save the data back to the server.  Once the asp:button event is called, the tab strip stops working, will not change values and no page view change.

From reading other post I tried setting the autopost to false and changing the cause validation to false, but with no luck...  Please help...

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="cphBody">
    <div id="cbody">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientIDMode="Static">
        <telerik:RadTabStrip ID="rtsProfile" runat="server" MultiPageID="rmpTabStripPanels"
            SelectedIndex="0" Skin="Outlook" ClientIDMode="Static" CausesValidation="False">
            <Tabs>
                <telerik:RadTab runat="server" Text="User Profile" Selected="True" PostBack="False">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Change Password" PostBack="False">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="rmpTabStripPanels" runat="server" SelectedIndex="0">
                <telerik:RadPageView ID="rpvUserProfile" runat="server">
                    <table>
                        <tr valign="top">
                            <td colspan="3">
                                <h2>
                                    User Profile</h2>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="3">
                                <p>
                                    Please fill in the information below. This information will be inserted into your
                                    letters to your bank and creditors. My Road To Recovery will email you alerts and
                                    other communications when you have actions that need to be taken. If you wish to
                                    receive SMS text messages, please provide your cell phone number and click the “YES”
                                    box next to the SMS text option.
                                </p>
                                <p>
                                    You can edit your information at any time. Please be sure to click the “Save” button
                                    at the bottom of the page.</p>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td style="width: 225px;">
                                <label>
                                    *First Name</label><br />
                                <asp:TextBox ID="txtFirstName" runat="server" SkinID="TextBox" Width="210" ClientIDMode="Static"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" Display="Dynamic" ControlToValidate="txtFirstName"
                                    ErrorMessage="First name is required." ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RequiredFieldValidator>
                            </td>
                            <td style="width: 225px;">
                                <label>
                                    *Last Name</label><br />
                                <asp:TextBox ID="txtLastName" runat="server" SkinID="TextBox" Width="210" ClientIDMode="Static"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvLastName" runat="server" Display="Dynamic" ControlToValidate="txtLastName"
                                    ErrorMessage="Last name is required." ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RequiredFieldValidator>
                            </td>
                            <td style="width: 250px;">
                                <label>
                                    Date of Birth (MM/DD/YYYY)</label><br />
                                <telerik:RadDateInput ID="txtDOB" runat="server" DateFormat="MM/dd/yyyy" SkinID="RadDateInput"
                                    Width="210" MinDate="1900-01-01" ClientIDMode="Static">
                                </telerik:RadDateInput><br />
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <label>
                                    Social Security Number</label><br />
                                <telerik:RadMaskedTextBox ID="txtSSNumber" runat="server" SkinID="RadMaskedTextBox"
                                    Width="212" Mask="###-##-####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revSSN" runat="server" Display="Dynamic" ControlToValidate="txtSSNumber"
                                    ErrorMessage="Valid social security number is required." ValidationExpression="\d{3}-\d{2}-\d{4}"
                                    ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                            <td>
                                <label>
                                    *Telephone Number</label><br />
                                <telerik:RadMaskedTextBox ID="txtTelephoneNumber" runat="server" SkinID="RadMaskedTextBox"
                                    Width="212" Mask="(###)-###-####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revTelephoneNumber" runat="server" Display="Dynamic"
                                    ControlToValidate="txtTelephoneNumber" ErrorMessage="Valid telephone number is required."
                                    ValidationExpression="\(\d{3}\)-\d{3}-\d{4}" ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                            <td align="left">
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td colspan="2" align="left">
                                            <label>
                                                Cell Phone Number</label><br />
                                        </td>
                                    </tr>
                                    <tr valign="bottom">
                                        <td align="left">
                                            <telerik:RadMaskedTextBox ID="txtCellPhoneNumber" runat="server" SkinID="RadMaskedTextBox"
                                                Width="105" Mask="(###)-###-####" ClientIDMode="Static">
                                            </telerik:RadMaskedTextBox>
                                        </td>
                                        <td align="left" style="white-space: nowrap;">
                                            <asp:CheckBox ID="chkSMSOptionOut" runat="server" Text="Receive Text Messages" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left">
                                            <asp:RegularExpressionValidator ID="revCellPhoneNumber" runat="server" Display="Dynamic"
                                                ControlToValidate="txtCellPhoneNumber" ErrorMessage="Valid cell phone number is required."
                                                ValidationExpression="\(\d{3}\)-\d{3}-\d{4}" ValidationGroup="SaveRecord" CssClass="error_message"
                                                SetFocusOnError="true">
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr valign="bottom">
                                        <td align="left" style="white-space: nowrap;">
                                            <label>
                                                *Email</label><br />
                                            <asp:TextBox ID="txtEmail" runat="server" SkinID="TextBox" Width="212" ClientIDMode="Static"> </asp:TextBox>
                                            <asp:CheckBox ID="chkEmailOptionOut" runat="server" Text="Receive Email Messages"
                                                ClientIDMode="Static" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Display="Dynamic" ControlToValidate="txtEmail"
                                                ErrorMessage="Valid email address is required." ValidationGroup="SaveRecord"
                                                CssClass="error_message" SetFocusOnError="true">
                                            </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="revEmail" runat="server"
                                                Display="Dynamic" ControlToValidate="txtEmail" ErrorMessage="Valid email address is required."
                                                ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                                                ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <label>
                                    *Street Address</label><br />
                                <asp:TextBox ID="txtStreetAddress" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="TextBox">
                                </asp:TextBox><br />
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <label>
                                    City</label><br />
                                <telerik:RadTextBox ID="txtCity" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="RadTextBox">
                                </telerik:RadTextBox><br />
                            </td>
                            <td>
                                <label>
                                    State</label><br />
                                <telerik:RadTextBox ID="txtState" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="RadTextBox">
                                </telerik:RadTextBox><br />
                            </td>
                            <td>
                                <label>
                                    ZIP Code</label><br />
                                <telerik:RadMaskedTextBox ID="txtZipCode" runat="server" SkinID="RadMaskedTextBox"
                                    AutoPostBack="true" Width="210" Mask="#####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revZipCode" runat="server" Display="Dynamic"
                                    ControlToValidate="txtZipCode" ErrorMessage="Valid zip code is required." ValidationExpression="\d{5}"
                                    ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator><asp:Label ID="lblZipError" runat="server" Text="Valid zip code is required."
                                    CssClass="error_message" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="3" align="left">
                                <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="SaveRecord" /><asp:Label
                                    ID="lblError" runat="server" ForeColor="Red"></asp:Label>
 
                            </td>
                        </tr>
                    </table>
                </telerik:RadPageView>
                <telerik:RadPageView ID="rpvChangePassword" runat="server">
                    <table width="100%">
                        <tr valign="top">
                            <td>
                                <h2>
                                    Change Password</h2>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <p>
                                    You can change your password at any time. Simply enter your old password and then
                                    enter your new password twice. Be sure to click the “Save” button on the bottom
                                    of the page.
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    Old Password</label>
                                <br />
                                <asp:TextBox ID="txtOldPassword" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvOldPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtOldPassword" ErrorMessage="Old password is required." ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator><asp:CustomValidator
                                        ID="cusOldPassword" runat="server" ControlToValidate="txtOldPassword" CssClass="error_message"
                                        Display="Dynamic" ErrorMessage="Incorrect Old Password entered." SetFocusOnError="True"
                                        ValidationGroup="SavePassword"></asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    New Password</label>
                                <br />
                                <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox>
                                <label style="font-weight: normal;">
                                    (Min 5 characters and have at least 1 number or symbol)</label>
                                <br />
                                <asp:RequiredFieldValidator ID="rfvNewPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPassword" ErrorMessage="New password is required." ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPassword" ErrorMessage="Min 5 characters and have at least 1 number or symbol is required."
                                    ValidationExpression="^.*(?=.*[a-zA-Z]{5,})((?=.*\d)|(?=.*\W)).*$" ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    Confirm New Password</label>
                                <br />
                                <asp:TextBox ID="txtNewPasswordConfirm" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvNewPasswordConfirm" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPasswordConfirm" ErrorMessage="Confirm password is required."
                                    ValidationGroup="SavePassword" CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator><asp:CompareValidator
                                        ID="cvNewPasswordConfirm" runat="server" Display="Dynamic" ControlToValidate="txtNewPasswordConfirm"
                                        ControlToCompare="txtNewPassword" ErrorMessage="Confirm password do not match."
                                        ValidationGroup="SavePassword" CssClass="error_message" SetFocusOnError="true">
                                    </asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <asp:Button ID="btnSavePassword" runat="server" Text="Save" ValidationGroup="SavePassword" />
                      
                            </td>
                        </tr>
                    </table>
                </telerik:RadPageView>
            </telerik:RadMultiPage>
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>


Here is the server code

Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click
    Try
        Dim dsCares As DataSet
        Dim drClient As DataRow
 
 
        dsCares = m_WSClient.client_get_only_Ex(m_SessionID, m_ClientID, m_ResultMsg)
        If IsDataTableValid(dsCares) = False Then
            lblError.Text = "Client ID Not found in database. Please contact Customer Care."
            Exit Try
        End If
 
        drClient = dsCares.Tables(0).Rows(0)
 
        drClient!FirstName = txtFirstName.Text
        drClient!LastName = txtLastName.Text
        drClient!StreetAddress = txtStreetAddress.Text
        drClient!StreetCity = txtCity.Text
        drClient!StreetState = txtState.Text
        drClient!StreetZip = txtZipCode.Text
        drClient!SSN = txtSSNumber.TextWithLiterals
        drClient!Phone1 = txtTelephoneNumber.TextWithLiterals
        drClient!MobilePhone = txtCellPhoneNumber.TextWithLiterals
        drClient!Email = txtEmail.Text
        drClient!BirthDate = txtDOB.SelectedDate
 
        drClient!EmailOptOut = chkEmailOptionOut.Checked
        drClient!SMSOptOut = chkSMSOptionOut.Checked
 
        m_WSClient.client_update(m_SessionID, dsCares, m_ClientID, m_ResultMsg)
 
        'Client_AddHistory(Session, String.Format("Client Updated User Profile [{0}]", txtEmail.Text))
 
        'tipSave.Show()
 
    Catch ex As Exception
        GlobalErrorHandler(System.Reflection.MethodBase.GetCurrentMethod(), ex)
        'Debug.WriteLine("Error:" + ex.ToString)
    End Try
End Sub
 
 
Protected Sub btnSavePassword_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSavePassword.Click
    Try
        Dim dtPasswd As WS_CLIENT.dsClients.ClientSecurityDataTable
 
        dtPasswd = m_WSClient.ClientSecurity_Filter_ClientID(m_SessionID, m_ClientID, m_ResultMsg)
        If IsDataTableValid(dtPasswd) = False Then
            cusOldPassword.ErrorMessage = "Unable to get old password. Contact Customer Care!"
            cusOldPassword.IsValid = False
            Exit Try
        End If
        If dtPasswd(0).ClientPassword <> txtOldPassword.Text Then
            cusOldPassword.ErrorMessage = "Incorrect Old Password entered."
            cusOldPassword.IsValid = False
            Exit Try
        End If
        ' password is valid
 
        Dim Ret = m_WSClient.ClientSecurity_Update(m_SessionID, m_ClientID, txtNewPassword.Text, 0, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_ResultMsg)
        ' tipSavePassword.Show()
 
    Catch ex As Exception
        GlobalErrorHandler(System.Reflection.MethodBase.GetCurrentMethod(), ex)
        'Debug.WriteLine("Error:" + ex.ToString)
    End Try
End Sub


5 Answers, 1 is accepted

Sort by
0
James Wink
Top achievements
Rank 1
answered on 21 Jul 2011, 10:37 PM

The Master Page has the RadScriptManager and a RadAjaxPanel wrapped around the content...

If that helps...

James

0
Kevin
Top achievements
Rank 2
answered on 22 Jul 2011, 01:32 PM
Hello James,

Could the issue be related to the ClientID mode you've set on the RadAjaxPanel and RadTabStrip? I know they had a discussion topic, related to the ClientID set to anything, outside of AutoID.

I hope that helps.
0
Kate
Telerik team
answered on 27 Jul 2011, 12:34 PM
Hello James,

The issue that you encounter seems to be in a very customized scenario. Therefore I would suggest that you open a support ticket and send us a simplified runnable project where we can observe the issue that you encounter and help you out with a suitable solution instead of trying to reproduce it on the first place.

Best wishes,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
epeele
Top achievements
Rank 1
answered on 28 Sep 2011, 01:46 AM
His issue may seem very customized, but I would venture to guess that it is not.  I'm also having the same type of behavior exhibited.  Using RadTabStrip with Multipage in a RadGrid (as in your Hierarchy with Templates demo) and it stops working the first time AJAX fires anywhere else on the page.  I've spent HOURS trying to figure this out to no avail.  The code is set up these same as the demo with the exception that each PageView has a GridView in it AND its an ASCX control hosted within a DNN site (no DNN components).  

If you resolved this issue, please post resolution.
0
Kate
Telerik team
answered on 03 Oct 2011, 08:54 AM
Hello Epeele,

James has not sent a runnable project as I asked in my previous post and therefore I can not tell the exact reason for the behavior. However, we used to have a bug of the RadTabStrip that seems to be very similar to the one that you describe in this post. Can you please try to use the latest version of the controls and let me know if you still encounter the issue?

Best wishes,
Kate
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
TabStrip
Asked by
James Wink
Top achievements
Rank 1
Answers by
James Wink
Top achievements
Rank 1
Kevin
Top achievements
Rank 2
Kate
Telerik team
epeele
Top achievements
Rank 1
Share this question
or