views:

378

answers:

1

I am building a User Control (requirement – has to be User Control). This user control is inside an AJAX Update Panel on the parent page. The user control has two Infragistics Web Date Chooser controls on it. Both dates are required. I have placed asp.net RequiredFieldValicators on both controls. I have placed ValidatorCalloutExtenders on both.

One control gets validated every time without fail. The other is intermittent. To debug I first removed the ValidatorCalloutExtender from the failing control and sure enough the RequiredFieldValidator fires correctly every time so it appears that the problem is with the ValidatorCalloutExtender. There are not a lot of options for the ValidatorCalloutExtender but I did play with them every way feasible and nothing seems to make any difference. The TargetControlID has to point to the validation control you are extending. Any help appreciated.

A: 

Here is the code that works correctly every time:

                    <igsch:WebDateChooser ID="wdcEndDatePop" runat="server" EnableAppStyling="True" 
                    NullDateLabel="" StyleSetName="eWERKS3" StyleSetPath="~/App_Themes/" 
                    Width="200px" MinDate="2009-01-01" />
                <asp:RequiredFieldValidator ID="rfvEndDate" runat="server" 
                    ControlToValidate="wdcEndDatePop" Display="None" 
                    ErrorMessage="End date required." ValidationGroup="endDatePop" />
                <cc1:ValidatorCalloutExtender 
                    ID="vceEndDatePop" 
                    runat="server" 
                    CloseImageUrl="~/images/close.gif" 
                    HighlightCssClass="validatorCalloutHighlight" 
                    TargetControlID="rfvEndDate" 
                    WarningIconImageUrl="~/images/back_warning2.gif" />

And here is the code that works intermitemtly:

                   <igsch:WebDateChooser ID="wdcStartDate" runat="server" EnableAppStyling="True" 
                    NullDateLabel="" StyleSetName="eWERKS3" StyleSetPath="~/App_Themes/" 
                   MinDate="2009-01-01" />
                <asp:RequiredFieldValidator ID="rfvStartDate" runat="server" 
                    ControlToValidate="wdcStartDate" Display="None" 
                    ErrorMessage="Start date required." ValidationGroup="access" />
                <cc1:ValidatorCalloutExtender 
                    ID="vceStartDate" 
                    runat="server" 
                    CloseImageUrl="~/images/close.gif" 
                    HighlightCssClass="validatorCalloutHighlight" 
                    TargetControlID="rfvStartDate" 
                    WarningIconImageUrl="~/images/back_warning2.gif" />
Jim Evans