Solved

MaskedEditExtender and  ValidatorCalloutExtender

Posted on 2010-08-31
6
1,662 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 500 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

742 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