下面是代碼,我想使用網絡控制其他形式的一些別的地方使用這個,但是當我將其拖動到其他的形式,它顯示錯誤,請查看代碼,並告訴我在哪裏IAM會錯誤的謝謝你。如何在c#中點擊文本框顯示日曆?
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="calander.ascx.cs" Inherits="Facultymanagement.calander" %>
<%--<%@ Import Namespace="AjaxControlToolkit" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<style type="text/css">
/*Calendar Control CSS*/
.cal_Theme1 .ajax__calendar_container {
background-color: #DEF1F4;
border:solid 1px #77D5F7;
}
.cal_Theme1 .ajax__calendar_header {
background-color: #ffffff;
margin-bottom: 4px;
}
.cal_Theme1 .ajax__calendar_title,
.cal_Theme1 .ajax__calendar_next,
.cal_Theme1 .ajax__calendar_prev {
color: #004080;
padding-top: 3px;
}
.cal_Theme1 .ajax__calendar_body {
background-color: #ffffff;
border: solid 1px #77D5F7;
}
.cal_Theme1 .ajax__calendar_dayname {
text-align:center;
font-weight:bold;
margin-bottom: 4px;
margin-top: 2px;
color: #004080;
}
.cal_Theme1 .ajax__calendar_day {
color: #004080;
text-align:center;
}
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_day,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_month,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_year,
.cal_Theme1 .ajax__calendar_active {
color: #004080;
font-weight: bold;
background-color: #DEF1F4;
}
.cal_Theme1 .ajax__calendar_today {
font-weight:bold;
}
.cal_Theme1 .ajax__calendar_other,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_today,
.cal_Theme1 .ajax__calendar_hover .ajax__calendar_title {
color: #bbbbbb;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="script" runat="server">
</asp:ScriptManager>
<div>
<asp:TextBox ID="tbEndDate" runat="server" CausesValidation="true" ReadOnly="true" Width="175px" />
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="tbEndDate" CssClass= " cal_Theme1" />
</div>
</form>
</body>
</html>
顯示我們的東西'(代碼)'你已經嘗試已經和你在哪裏失敗。 – Sadique
這是什麼問題? –
http://www.aspdotnet-suresh.com/2012/06/ajax-calendar-extender-control-example.html –