本文介绍了calendarextender无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
im在c#asp.net中使用ajaxtoolkit,calendarextendar无法正常工作..
im using ajaxtoolkit in c# asp.net,calendarextendar not working properly..
我的代码是
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="calaender.aspx.cs" Inherits="BorvoPharmaceuticals.calaender" MasterPageFile="~/Site.Master" %>
<%@注册程序集="AjaxControlToolkit"命名空间="AjaxControlToolkit" TagPrefix ="cc1"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<div>
<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="true"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True"
PopupButtonID="TextBox1" TargetControlID="TextBox1"
Format="dd-MM-yyyy"></cc1:CalendarExtender>
</div>
删除了ajaxtoolkit参考,也重新添加了....但是当我单击文本框时,日历不会显示.
ajaxtoolkit reference removed also re added....but when i click textbox calendar is not display..
推荐答案
问题是您正在将"asp"的tagPrefix分配给 AJAXControlToolkit
控件.
The problem is you're assigning the tagPrefix of "asp" to the AJAXControlToolkit
controls.
<%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" tagPrefix="asp" %>
删除对AJAX Control Toolkit的引用并重新添加它.
Remove the reference to AJAX Control Toolkit and re-add it.follow this
<asp:TextBox ID="txtExpDate" runat="server" CssClass="textbox" AutoPostBack="true">
</asp:TextBox>
<cc1:CalendarExtender ID="TxtDate_CalendarExtender" runat="server" Enabled="True"
PopupButtonID="txtExpDate" TargetControlID="txtExpDate"
Format="dd-MM-yyyy">
</cc1:CalendarExtender>
这篇关于calendarextender无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!