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 TryEnd SubProtected 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 TryEnd Sub