注意, 不是创建用户控件, 是要单独在一个项目中做一个类, 然后编译成dll文件.HTML代码
<asp:TextBox ID="tb_fca_from" runat="server" SkinID="Date"></asp:TextBox><asp:RegularExpressionValidator
    ID="rev_ex_factory_date" runat="server" CssClass="verdana12ptbo" ControlToValidate="tb_fca_from"
    Display="Dynamic" ErrorMessage="<br/>日期不符合格式" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$">
</asp:RegularExpressionValidator>
<asp:Panel ID="panel_fca_from" runat="server" Style="display: none;">
    <asp:UpdatePanel ID="up_fca_from" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Calendar ID="cal_fca_from" runat="server" OnSelectionChanged="cal_fca_from_SelectionChanged">
            </asp:Calendar>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Panel>
<ajaxToolKit:PopupControlExtender ID="pce_fca_from" runat="server" PopupControlID="panel_fca_from"
    TargetControlID="tb_fca_from" Position="Bottom">
</ajaxToolKit:PopupControlExtender>C#代码
    protected void cal_fca_from_SelectionChanged(object sender, EventArgs e)
    {
        pce_fca_from.Commit(cal_fca_from.SelectedDate.ToString("yyyy-MM-dd"));
    }