?
Solved

MaskedEditExtender and  ValidatorCalloutExtender

Posted on 2010-08-31
6
Medium Priority
?
1,735 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 2000 total points
ID: 33623876
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
ID: 33624291
Thanks for your reply masterpass,
but still it is not working
0
 
LVL 21

Expert Comment

by:masterpass
ID: 33624534
Did you try the example from the link given ? works perfectly for me !!!
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
LVL 8

Author Comment

by:johny_bravo1
ID: 33625104
<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
ID: 33625113
Does that example work for you ?
0
 
LVL 8

Author Closing Comment

by:johny_bravo1
ID: 33625398
Thanks it works fine.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, left to enroll

862 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