文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>ajaxToolkit 3.5sp1==>Calendar

ajaxToolkit 3.5sp1==>Calendar

时间:2010-08-30  来源:龍龙

ajaxToolkit中,Calendar的验证有Culture的问题,如果要用MM/dd/yyyy这种格式,参考下面的设置:

 

<%@ Page
    Language="C#"
    MasterPageFile="~/DefaultMaster.master"
    AutoEventWireup="true"
    Inherits="CommonPage"
    Culture="en-US"
    UICulture="en-US"
    Title="MaskedEdit Sample"
    Theme="SampleSiteTheme" %>
<%@ Register
    Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit"
    TagPrefix="ajaxToolkit" %>
<%@ Import Namespace="System.Threading" %>
<asp:Content ContentPlaceHolderID="SampleContent" runat="Server">
    <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1"  EnableScriptGlobalization="true" EnableScriptLocalization="true" />
    <div class="demoarea">
        <div class="demoheading">MaskedEdit Demonstration</div>

        <asp:TextBox ID="TextBox5" runat="server" Width="130px" style="text-align:justify" ValidationGroup="MKE" />
        <asp:ImageButton ID="ImgBntCalc" runat="server" ImageUrl="~/images/Calendar_scheduleHS.png" CausesValidation="False" />
        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" PopupButtonID="ImgBntCalc" Enabled="True" runat="server" TargetControlID="TextBox5" Format="MM/dd/yyyy" />
        <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender5" runat="server"
            TargetControlID="TextBox5"
            Mask="99/99/9999"
            OnFocusCssClass="MaskedEditFocus"
            OnInvalidCssClass="MaskedEditError"
            MaskType="Date"

             CultureAMPMPlaceholder=""
 CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
 CultureDatePlaceholder="" CultureDecimalPlaceholder=""
 CultureThousandsPlaceholder="" CultureTimePlaceholder=""
CultureName="en-US"/>
           
        <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator1" runat="server"
            ControlExtender="MaskedEditExtender5"
            ControlToValidate="TextBox5"
            EmptyValueMessage="Date is required"
            InvalidValueMessage="Date is invalid"
            Display="Dynamic"
            TooltipMessage="Input a date"
            EmptyValueBlurredText="*"
            InvalidValueBlurredMessage="*"
            ValidationExpression="^\d{2}/\d{2}/\d{4}$" IsValidEmpty="False"
            ValidationGroup="MKE"/>

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载