Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MaskedEditExtender and  ValidatorCalloutExtender

Posted on 2010-08-31
6
Medium Priority
?
1,715 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 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