让MaskedEdit 支持dd-MMM-yyyy格式(MaskedEdit date for dd-MMM-yyyy)

<%@ Page Language=”C#” %>

<%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”ajaxToolkit” %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<script runat=“server”>

</script>

<html xmlns=“http://www.w3.org/1999/xhtml”>
<head runat=“server”>
    
<title></title>
</head>
<body>
    
<form id=“form1″ runat=“server”>
    
<div>
    
<div>
        
<ajaxToolkit:ToolkitScriptManager ID=“ToolkitScriptManager1″ runat=“server”>
        
</ajaxToolkit:ToolkitScriptManager>
        
<strong>Enter Date (format:dd-MMM-yyyy <em>dd-MMM-yyyy</em>):</strong>
        
<br />
        
<asp:TextBox ID=“TextBox2″ runat=“server” ReadOnly=“false” />
        
<ajaxToolkit:MaskedEditExtender ID=“MaskedEditExtender2″ runat=“server” ClearMaskOnLostFocus=“false”
            
MaskType=“none” Mask=“99-LLL-9999″ TargetControlID=“TextBox2″ Filtered=“-” />
        
<ajaxToolkit:MaskedEditValidator ID=“MaskedEditValidator2″ runat=“server” ControlToValidate=“TextBox2″
            
ControlExtender=“MaskedEditExtender2″ EmptyValueMessage=“Start Date is Required”
            InvalidValueMessage
=“Date is Invalid” IsValidEmpty=“False” TooltipMessage=“Input a Date”
            Enabled
=“true” />
        
<ajaxToolkit:CalendarExtender ID=“CalendarExtender3″ runat=“server” TargetControlID=“TextBox2″
            
Format=“dd-MMM-yyyy” PopupButtonID=“ImageButton2″ />
    
</div>
    
</div>
    
</form>
</body>
</html>

posted @ 2008-10-31 16:23 LanceZhang 阅读(...) 评论(...) 编辑 收藏