LanceZhang’s Blog

Dear friends, Welcome to my blog.

MaskedEdit date for dd-MMM-yyyy

Please try the following code:



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

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

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”&gt;

<script runat=“server”>


<html xmlns=;>
<head runat=“server”>
    <form id=“form1” runat=“server”>
        <ajaxToolkit:ToolkitScriptManager ID=“ToolkitScriptManager1” runat=“server”>
        <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” />


October 31, 2008 - Posted by | ASP.NET AJAX |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: