add events to calendar control in asp.net
i want to add events to calendar control dynamically and show events on that particular date anyone knows how to do this?please help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Parveen SiwachPosted May 15, 2013, 4:53 PM
This DayRenderEventArgs has got two very useful things - Day and Cell.
Day is of the type "CalendarDay" and Cell is of the type "TableCell".
Day can help us in identifying the day, date etc which it is going to render and Cell gives us handle to the table cell corresponding to that day.
Now since we have handle to Table Cell of displaying Date, we can play with it to cater to our needs. For event Calendar we are simply going to use this event to add the event details in the Table Cells associated with the dates.
e.g.:
CalendarDay d = ((DayRenderEventArgs)e).Day;
TableCell c = ((DayRenderEventArgs)e).Cell;
if ( !d.IsOtherMonth )
c.Controls.Add(new LiteralControl("Test Event Details"));
You can also follow the the following link for more details:
http://www.codeproject.com/Articles/16592/Event-Calendar-ASP-NET-2-0-C
Hope this will help you to solve your problem.