创建自定义日历 [英] Create Custom Calendar
本文介绍了创建自定义日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的,
谢谢你
任何人都知道如何使用.NET在Windows应用程序和Web应用程序中创建自定义日历控件
Dear,
Thank u
Can anybody has idea how to create custom calendar control in Windows application and web application using .NET
推荐答案
这可能对你有帮助
aspx
< title>
功能openPage(url){
window.open(url);
}
< asp:calendar id =Calendar1runat =server ondayrender =Calendar1_DayRenderxmlns:asp =#unknown>
< selecteddaystyle backcolor =#FF0066>
in Cs
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
Image image = new Image();
image.ImageUrl =〜/ Images / plus.png;
string pageUrl =http:// www .microsoft.com;
image.Attributes.Add(onclick,openPage(''+ pageUrl +''););
image .Attributes.Add(style,cursor:pointer);
e.Cell.Controls.Add(image);
}
This may help u
aspx
<title>
function openPage(url) {
window.open(url);
}
<asp:calendar id="Calendar1" runat="server" ondayrender="Calendar1_DayRender" xmlns:asp="#unknown">
<selecteddaystyle backcolor="#FF0066">
in Cs
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
Image image = new Image();
image.ImageUrl = "~/Images/plus.png";
string pageUrl = "http://www.microsoft.com";
image.Attributes.Add("onclick", "openPage(''" + pageUrl + "'');");
image.Attributes.Add("style", "cursor:pointer");
e.Cell.Controls.Add(image);
}
这篇关于创建自定义日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文