Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
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
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
When Good HTML Goes Bad: How You Can Protect Your Web Applications
Windows 8: 50 Questions and Answers You Need to Make a Decision (Normally $9.95)