Click here to Skip to main content
15,888,148 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
Dear,
Thank u

Can anybody has idea how to create custom calendar control in Windows application and web application using .NET
Posted
Updated 29-May-13 7:04am
v3
Comments
Sergey Alexandrovich Kryukov 29-May-13 12:56pm    
What do you mean "how"? By doing some programming work. Any questions? This is a Quick Questions & Answers forum. "Can anybody..." does not count as a question.
—SA
ZurdoDev 29-May-13 14:27pm    
Yes, we all have an idea; however, there are millions of ways to approach it and this is better suited as an article posting instead of in Quick Answers.

1 solution

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);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900