-1

下面的代码工作正常,我不小心删除了 ajax 工具包,当我重新配置它时,它在单击文本框时显示日历。请告诉我如何处理它。此外,我要求您尽快回复

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/emp.Master" CodeBehind="empleaveapp.aspx.vb" Inherits="abc.WebForm10" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



<head />.

<%--
<head id="Head2" runat="server" />.

--%>
<head />.
    <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:Label ID="Label1" runat="server" Text="From"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="calefrom" runat="server" CssClass="textbox" Height="16px" 
        Width="157px"></asp:TextBox>
    <cc1:CalendarExtender ID="calefrom_CalendarExtender" runat="server" 
        Enabled="True" TargetControlID="calefrom" Format="yyyy-MM-dd">
    </cc1:CalendarExtender>
    &nbsp;&nbsp;<asp:CompareValidator ID="CompareValidator2" runat="server" 
        ControlToCompare="txttdate" ControlToValidate="calefrom" CssClass="active" 
        ErrorMessage="Please enter a day after today's date" 
        Operator="GreaterThan" >  </asp:CompareValidator>
    <br />
    <asp:TextBox ID="txttdate" runat="server" Width="1px"></asp:TextBox>
    <br />
    <asp:Label ID="Label2" runat="server" Text="To"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="caleto" runat="server" Height="20px" CssClass="textbox"></asp:TextBox>
    <cc1:CalendarExtender ID="caleto_CalendarExtender" runat="server" 
        Enabled="True" TargetControlID="caleto"  Format="yyyy-MM-dd">
    </cc1:CalendarExtender>
        <asp:CompareValidator ID="CompareValidator1" runat="server" Format="yyyy-MM-dd" 
        ControlToCompare="calefrom" ControlToValidate="caleto" 
        ErrorMessage="To date can not be smaller then from date" 
        Operator="GreaterThanEqual"></asp:CompareValidator>
        <br />
    <br />
    <asp:Label ID="Label3" runat="server" Text="Reason"></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtreason" runat="server" 
        CssClass="textbox"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="txtreason" 
        ErrorMessage="Reason is must for manager to know better"></asp:RequiredFieldValidator>
    <br />
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" Text="Send Request" />
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>    
4

1 回答 1

0

是你的ScriptManager。它应该是cc1:ToolkitScriptManager而不是asp:ScriptManager。您需要工具包的脚本才能使扩展程序工作。

于 2013-06-03T12:29:32.027 回答