Solved

MaskedEditExtender and  ValidatorCalloutExtender

Posted on 2010-08-31
6
1,605 Views
Last Modified: 2012-05-10

Hi Experts
I am using MaskedEditExtender and  ValidatorCalloutExtender,but having problems with it.
The validation fires even if date is correct.

<asp:TextBox ID="txtFromDate" Width="80px" CssClass="inputdate" runat="server"></asp:TextBox>
                                    <cc1:MaskedEditExtender ID="MEEFromDate" runat="server" Mask="99/99/9999" MaskType="Date"
                                        UserDateFormat="MonthDayYear" TargetControlID="txtFromDate" PromptCharacter="_">
                                    </cc1:MaskedEditExtender>
                                    <cc1:CalendarExtender ID="ceFromDate" runat="server" Enabled="True" Format="MM/dd/yyyy"
                                        TargetControlID="txtFromDate">
                                    </cc1:CalendarExtender>
                                    <cc1:MaskedEditValidator ValidationGroup="Professional" ID="MEVFromDate" runat="server"
                                        ControlExtender="MEEFromDate" Display="None" ControlToValidate="txtFromDate" EmptyValueMessage="Please enter valid date"
                                        InvalidValueMessage="Please enter valid date" IsValidEmpty="False" TooltipMessage="Input a Date"></cc1:MaskedEditValidator>
                                    <cc1:ValidatorCalloutExtender ID="MEVFromDate_ValidatorCalloutExtender" runat="server"
                                        Enabled="True" TargetControlID="MEVFromDate" WarningIconImageUrl="~/Images/ErrorProvider.gif"
                                        Width="150px">
                                    </cc1:ValidatorCalloutExtender>

Whats going wrong here?
0
Comment
Question by:johny_bravo1
  • 3
  • 3
6 Comments
 
LVL 21

Accepted Solution

by:
masterpass earned 500 total points
Comment Utility
I think you need to have the ValidationGroup in the TextBox too

<asp:TextBox ID="txtFromDate" Width="80px" CssClass="inputdate" runat="server" ValidationGroup="Professional" />

ref : http://forums.asp.net/t/1296726.aspx
0
 
LVL 8

Author Comment

by:johny_bravo1
Comment Utility
Thanks for your reply masterpass,
but still it is not working
0
 
LVL 21

Expert Comment

by:masterpass
Comment Utility
Did you try the example from the link given ? works perfectly for me !!!
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 8

Author Comment

by:johny_bravo1
Comment Utility
<asp:TextBox ID="txtFromDate" ValidationGroup="Professional" Width="80px" CssClass="inputdate"
                                        runat="server"></asp:TextBox>
                                    <cc1:MaskedEditExtender ID="MEEFromDate" runat="server" Mask="99/99/9999" MaskType="Date"
                                        UserDateFormat="MonthDayYear" TargetControlID="txtFromDate" PromptCharacter="_">
                                    </cc1:MaskedEditExtender>
                                    <cc1:CalendarExtender ID="ceFromDate" runat="server" Enabled="True" Format="MM/dd/yyyy"
                                        TargetControlID="txtFromDate">
                                    </cc1:CalendarExtender>
                                    <cc1:MaskedEditValidator ValidationGroup="Professional" ID="MEVFromDate" runat="server"
                                        ControlExtender="MEEFromDate" Display="None" ControlToValidate="txtFromDate"
                                        EmptyValueMessage="Please enter valid date" InvalidValueMessage="Please enter valid date"
                                        IsValidEmpty="False" TooltipMessage="Input a Date"></cc1:MaskedEditValidator>
                                    <cc1:ValidatorCalloutExtender ID="MEVFromDate_ValidatorCalloutExtender" runat="server"
                                        Enabled="True" TargetControlID="MEVFromDate" WarningIconImageUrl="~/Images/ErrorProvider.gif"
                                        Width="150px">
                                    </cc1:ValidatorCalloutExtender>

This is what I am doing,but gets the message every time even if the date is in correct format
0
 
LVL 21

Expert Comment

by:masterpass
Comment Utility
Does that example work for you ?
0
 
LVL 8

Author Closing Comment

by:johny_bravo1
Comment Utility
Thanks it works fine.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now