AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 How can I enable a specific colum in calendar control
Posted by jafar sadique on  2/14/2009 12:04:13 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
I want to enable only one day of week of a calendar control at the time of page load depending on a fixed day from previous page by Session. I use C# for coding.

Post Your Reply Post New Question

 Viewer's Reply
Use Calendar1_DayRender Event of Calendar Control
Answered By Moderator1 on 4/2/2009 4:56:27 AM
Try like this,

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (Session["EnableDate"] == null) return;
if (!(e.Day.DayNumberText == Session["EnableDate"].ToString()))
{
e.Day.IsSelectable = false;
}
}
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Everything You Know About CSS Is Wrong! - Free 37 Page Preview!
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Programmers Heaven C# School Book - Free 338 Page eBook