Problem with Mask Edit Extendar

Posted by Shoyebaziz123 under Regular Expressions on 6/27/2011 | Points: 10 | Views : 2294 | Status : [Member] | Replies : 2
Hi All,
I have write this code for date Validation

<asp:TextBox ID="txtDate" runat="server" onchange="return ValidateDate(this);" ></asp:TextBox>

<asp:MaskedEditExtender ID="txtDate_MaskedEditExtender" runat="server"
TargetControlID="txtDate" Mask="99/99/9999" MaskType="DateTime" >
</asp:MaskedEditExtender>

<asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="txtDate" PopupButtonID="imgDate" Format="dd/MM/yyyy">
</asp:CalendarExtender>

<asp:Image ID="imgDate" runat="server" Height="21px"
ImageUrl="~/Image/Calendar_Icon.jpg" Width="26px" />

where TextBox onchange event i am calling the javascript validation function, if i remove the maskedit extendatr it works properly but with maskedit javascript function not call.

what is the reason ?
Thanks




Responses

Posted by: Ndebata on: 6/28/2011 [Member] Starter | Points: 25

Up
0
Down
In such case try to use ASP.Net custom validator controls

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 6/28/2011 [Member] Starter | Points: 25

Up
0
Down
hi..You can validate your data using mask edit vaidator...
Try this Below code


<cc2:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1" ControlToValidate="TextBox1" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" IsValidEmpty="False" TooltipMessage="Input a Date"></cc2:MaskedEditValidator>



Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response