Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

MaskedEditValidator Page.IsValid returns false when using "en-UK" culture

$
0
0

<asp:TextBox id="txtDate" runat="server" Width="70"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "Date") %>'/><atk:MaskedEditExtender ID="meeDate" CultureName="en-GB" runat="server" Mask="99/99/9999" MaskType="Date" TargetControlID="txtDate" PromptCharacter="_" /><atk:MaskedEditValidator ID="mevDate" runat="server" ControlExtender="meeDate" ControlToValidate="txtDate"
                                        EmptyValueMessage=" *" InvalidValueMessage="Date is invalid" IsValidEmpty="False" CssClass="validatorError" />



The following setup seems to work fine on the client side, however when I post back and check Page.IsValid, the value is false.  I also looked at mevDate.IsValid and it's false.  It seems that setting the CultulreName on the MaskedEditExtender is sufficient to get the MaskedEditValidator to emit the correct JavaScript, but on the server side of things it doesn't work.  When I flip CultureName to "en-US" everything works as expected.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>