search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to create dynamically the calendar

Asked by Olivier
14 years ago.

Hi,

I need to create a calendar dynamically in C#.

How can I proceed without accessing to asp.net page?

A simple example would be highly appreciated.

Thanks for your help

Comment posted by Dan Letecky
14 years ago.
It's not too complicated:

1. Put a PlaceHolder control on the page (this will help you to position the calendar).
2. Create the control in the Page_Load method and add it to the Controls collection of the placeholder:

protected void Page_Load(object sender, EventArgs e)
{
DayPilotCalendar dpc = new DayPilotCalendar();
PlaceHolder1.Controls.Add(dpc);
}
This will add an empty control. You can modify it by setting the properties. You just have to set them in the Page_Load instead of int the .aspx template.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.