RadAjaxLoadingPanel disables ASP Validators

2 posts, 0 answers
  1. Bruce Dimon
    Bruce Dimon avatar
    2 posts
    Member since:
    Aug 2012

    Posted 29 Jul 2010 Link to this post

    I have a web form with text boxes and ASP Validators. I wanted to add a RadAjaxLoadingPanel to give some feedback when the code was updating. The AjaxUpdatedControl disables all of the ASP Validators. The Javascript for the ASP Validators is not in the page source. The XmlHttpPanel_ServiceRequest is empty in the code-behind. If I comment out the AjaxUpdatedControls, the validators work!

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
        CodeBehind="EditUser.aspx.cs" Inherits="AdCacEdits.EditPages.EditUser" %>
      
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanelControls" runat="server" Skin="Default">
        </telerik:RadAjaxLoadingPanel>
        <h2>
            Edit User: Edit User by User name or CAC ID Number
        </h2>
        <p>
            Enter the user name to edit the user's information:
            <asp:TextBox ID="TextBoxUserName" runat="server" Width="250px"></asp:TextBox>
             <asp:Button ID="ButtonLookupUser" runat="server" Text="Look Up" OnClick="ButtonLookupUser_Click" />
             in the
            <asp:Label ID="LabelDomain" runat="server" Text="Label"></asp:Label>
            domain.<br />
        </p>
        <asp:Panel ID="PanelNotFound" runat="server">
            <asp:Label ID="LabelNotFound" runat="server"></asp:Label>
        </asp:Panel>
        <asp:Panel ID="PanelUserInfo" runat="server" Visible="True">
            <asp:Label ID="LabelAccountStatus" runat="server" Text="User Account Status"></asp:Label>
            <asp:ValidationSummary ID="ValidationSummaryUserUpdate" runat="server" ValidationGroup="ValidationGroupUserUpdate"
                CssClass="failureNotification" HeaderText="You must correct these errors before you can update the record." />
            <br />
            <table style="width: 100%;">
                <tr>
                    <td class="tableQuarterLabels" width="25%">
                        Active Account
                    </td>
                    <td class="tableQuarterColumns" width="25%">
                        <asp:Label ID="LabelActiveStatus" runat="server"></asp:Label>
                    </td>
                    <td class="tableQuarterLabels" width="25%">
                        Organizational Unit
                    </td>
                    <td class="tableQuarterColumns" width="25%">
                        <asp:Label ID="LabelOu" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Employee #<asp:RegularExpressionValidator ID="RegularExpressionValidatorCac" runat="server"
                            ControlToValidate="TextBoxEmployeeId" ErrorMessage="CAC ID numbers must be exactly ten digits"
                            ValidationExpression="\b(\d){10}\b" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification" Display="Dynamic">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxEmployeeId" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels" colspan="2">
                        <asp:Label ID="LabelDistinguishedName" runat="server" Enabled="False" Text="Distinguished Name"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Last Name or Surname<asp:RegularExpressionValidator ID="RegularExpressionValidatorSurname"
                            runat="server" ControlToValidate="TextBoxSurname" ErrorMessage="Surnames must be just letters"
                            ValidationExpression="^[a-zA-Z-'.\s\,ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,40}$"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorLastName" runat="server" ControlToValidate="TextBoxSurname"
                            ErrorMessage="Must enter a last name" ToolTip="Must enter a last name" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RequiredFieldValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxSurname" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        Account Enabled
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:CheckBox ID="CheckBoxAccountEnabled" runat="server" Text="User disabled if clear"
                            Enabled="False" />
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        First Name<asp:RequiredFieldValidator ID="RequiredFieldValidatorFirstName" runat="server"
                            ControlToValidate="TextBoxFirstName" ErrorMessage="Must enter a first name" ToolTip="Must enter a first name"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorFirstName" runat="server"
                            ControlToValidate="TextBoxFirstName" ErrorMessage="First names must be just letters"
                            ValidationExpression="^[a-zA-Z-'.\s\,ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,40}$"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxFirstName" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        Middle Name or Inital<asp:RegularExpressionValidator ID="RegularExpressionValidatorMiddleName"
                            runat="server" ControlToValidate="TextBoxMiddleName" ErrorMessage="Middle names must be just letters"
                            ValidationExpression="^[a-zA-Z-'.\s\,ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,40}$"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxMiddleName" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Display Name<asp:RegularExpressionValidator ID="RegularExpressionValidatorDisplayName"
                            runat="server" ControlToValidate="TextBoxDisplayName" ErrorMessage="Display names must be just letters"
                            ToolTip="Display names must be just letters" ValidationExpression="^[a-zA-Z-'.\s\,ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,80}$"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxDisplayName" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Locked Out
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:CheckBox ID="CheckBoxLockedOut" runat="server" Text="Locked if checked" Enabled="False" />
                    </td>
                    <td class="tableQuarterLabels">
                        Bad Password Count
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelBadPasswordCount" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Password Last Changed
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelPasswordLastChanged" runat="server"></asp:Label>
                    </td>
                    <td class="tableQuarterLabels">
                        Last Bad Password
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelLastBadPassword" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Must Change Password
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:CheckBox ID="CheckBoxMustChangePassword" runat="server" Text="Must change at next login"
                            Enabled="False" />
                    </td>
                    <td class="tableQuarterLabels">
                        Log On Count
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelLogOnCount" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Last Log On
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelLastLogOn" runat="server"></asp:Label>
                    </td>
                    <td class="tableQuarterLabels">
                        Last Log Off
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:Label ID="LabelLastLogOff" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels" style="height: 27px">
                        Home Phone<asp:RegularExpressionValidator ID="RegularExpressionValidatorHomePhone"
                            runat="server" ControlToValidate="TextBoxHomePhone" ErrorMessage="Home phone format is wrong"
                            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" ValidationGroup="ValidationGroupUpdateUser"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns" style="height: 27px">
                        <asp:TextBox ID="TextBoxHomePhone" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels" style="height: 27px">
                        Work Phone<asp:RegularExpressionValidator ID="RegularExpressionValidatorWorkPhone"
                            runat="server" ControlToValidate="TextBoxWorkPhone" ErrorMessage="Work phone format is wrong"
                            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns" style="height: 27px">
                        <asp:TextBox ID="TextBoxWorkPhone" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Mobile Phone<asp:RegularExpressionValidator ID="RegularExpressionValidatorMobilePhone"
                            runat="server" ControlToValidate="TextBoxMobilePhone" ErrorMessage="Mobile phone format is wrong"
                            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxMobilePhone" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        Other Phone
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorOtherPhone" runat="server"
                            ControlToValidate="TextBoxOtherPhone" ErrorMessage="Other phone format is wrong"
                            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification" ToolTip="Other phone format is wrong">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxOtherPhone" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Fax Number<asp:RegularExpressionValidator ID="RegularExpressionValidatorFaxNumber"
                            runat="server" ControlToValidate="TextBoxFaxNumber" ErrorMessage="Fax phone format is wrong"
                            ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxFaxNumber" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        Initials<asp:RegularExpressionValidator ID="RegularExpressionValidatorInitials" runat="server"
                            ControlToValidate="TextBoxInitials" ErrorMessage="Only 2 or 3 letters allowed for initials"
                            ValidationExpression="^(\w){2,3}$" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxInitials" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Smart Card Required
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:CheckBox ID="CheckBoxSmartCardRequired" runat="server" Text="For workstation login only"
                            Enabled="False" />
                    </td>
                    <td class="tableQuarterLabels">
                        Account Expires
                    </td>
                    <td class="tableQuarterColumns">
                        <telerik:RadDateInput ID="RadDateInputAccountExpires" runat="server" Culture="en-US"
                            DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" Width="100%">
                        </telerik:RadDateInput>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        User's URL<asp:RegularExpressionValidator ID="RegularExpressionValidatorUserUrl"
                            runat="server" ControlToValidate="TextBoxUserUrl" ErrorMessage="URL is not in a valid format"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxUserUrl" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Email<asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" runat="server"
                            ControlToValidate="TextBoxEmail" ErrorMessage="Must enter a valid email" ToolTip="Must enter a valid email"
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ValidationGroupUserUpdate"
                            CssClass="failureNotification">*</asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorEmail" runat="server" ControlToValidate="TextBoxEmail"
                            ErrorMessage="Must enter the user's email" ToolTip="Must enter the user's email"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification">*</asp:RequiredFieldValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxEmail" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Company<asp:RegularExpressionValidator ID="RegularExpressionValidatorCompany" runat="server"
                            CssClass="failureNotification" ErrorMessage="Company must be valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxCompany"
                            ToolTip="Company must be valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxCompany" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Department<asp:RegularExpressionValidator ID="RegularExpressionValidatorDepartment"
                            runat="server" CssClass="failureNotification" ErrorMessage="Department must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxDepartment"
                            ToolTip="Department must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxDepartment" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Title<asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle" runat="server"
                            CssClass="failureNotification" ErrorMessage="Title must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxTitle"
                            ToolTip="Title must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxTitle" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Description<asp:RegularExpressionValidator ID="RegularExpressionValidatorDescription"
                            runat="server" CssClass="failureNotification" ErrorMessage="Description must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxDescription"
                            ToolTip="Descriptions must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxDescription" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        User Information<asp:RegularExpressionValidator ID="RegularExpressionValidatorUserInfo"
                            runat="server" CssClass="failureNotification" ErrorMessage="User Info must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxUserInfo"
                            ToolTip="User Info must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxUserInfo" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Street<asp:RegularExpressionValidator ID="RegularExpressionValidatorStreet" runat="server"
                            CssClass="failureNotification" ErrorMessage="Street must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxStreet"
                            ToolTip="Street must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableList" colspan="3">
                        <asp:TextBox ID="TextBoxStreet" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Street Second Line<asp:RegularExpressionValidator ID="RegularExpressionValidatorStreet2"
                            runat="server" CssClass="failureNotification" ErrorMessage="Second Street must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxStreet2"
                            ToolTip="Second Street must use valid characters" ValidationExpression="^[0-9a-zA-Z\s#.,:;]{1,80}$">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns" colspan="3">
                        <asp:TextBox ID="TextBoxStreet2" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        City<asp:RegularExpressionValidator ID="RegularExpressionValidatorCity" runat="server"
                            CssClass="failureNotification" ErrorMessage="City must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxCity" ToolTip="City must use valid characters"
                            ValidationExpression="^[a-zA-Z-'.\s\,#ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,80}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxCity" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        State<asp:RegularExpressionValidator ID="RegularExpressionValidatorState" runat="server"
                            CssClass="failureNotification" ErrorMessage="State must use valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxState"
                            ToolTip="State must use valid characters" ValidationExpression="^[a-zA-Z-'.\s\,#ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀ]{1,20}$">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxState" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tableQuarterLabels">
                        Postal Code<asp:RegularExpressionValidator ID="RegularExpressionValidatorPostalCode"
                            runat="server" ControlToValidate="TextBoxPostalCode" ErrorMessage="Postal code is not in a valid US format"
                            ValidationGroup="ValidationGroupUserUpdate" CssClass="failureNotification" ValidationExpression="\d{5}(-\d{4})?">*</asp:RegularExpressionValidator>
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxPostalCode" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td class="tableQuarterLabels">
                        Post Office Box<asp:RegularExpressionValidator ID="RegularExpressionValidatorPoBox"
                            runat="server" CssClass="failureNotification" ErrorMessage="PO Box must be valid characters"
                            ValidationGroup="ValidationGroupUserUpdate" ControlToValidate="TextBoxPoBox"
                            ToolTip="PO Box must be valid characters" ValidationExpression="^[0-9a-zA-Z-'.\s\,#]{1,20}$">*</asp:RegularExpressionValidator>
                           
                    </td>
                    <td class="tableQuarterColumns">
                        <asp:TextBox ID="TextBoxPoBox" runat="server" Width="100%"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <br />
            <asp:Button ID="ButtonUpdate" runat="server" Text="Update Active Directory" OnClick="ButtonUpdate_Click"
                ValidationGroup="ValidationGroupUserUpdate" />
        </asp:Panel>
        <telerik:RadXmlHttpPanel ID="radXmlHttpPanelControls" runat="server" LoadingPanelID="radAjaxLoadingPanelControls"
            OnServiceRequest="XmlHttpPanel_ServiceRequest">
      
        </telerik:RadXmlHttpPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="ButtonLookupUser">
                    <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="radXmlHttpPanelControls" LoadingPanelID="radAjaxLoadingPanelControls" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="ButtonUpdate">
                    <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="radXmlHttpPanelControls" LoadingPanelID="radAjaxLoadingPanelControls" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </asp:Content>
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 03 Aug 2010 Link to this post

    Hi Bruce,

    When ajaxifying controls using the RadAjaxManager, you are actually specifying which controls will be updated, and which controls will trigger the ajax requests. In your case only the XmlHttpPanel will be updated, when any of the buttons are clicked. Any validators (or in fact any other controls) that are affected by the buttons' click events will not be updated. This on the other hand will not cause the client validation to not work, since it does not depend on whether a control is ajaxified or not.
    I tested your code locally, with some modifications, and the client validation works correctly. Please find it attached to the thread. Please note, that the RadXmlHttpPanel does not support ASP.NET validation, and you need to implement your own way to make sure the data entered is correct.


    Kind regards,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top