views:

21

answers:

1

We want to use the calendar control to fill it with some text for each day, we tried two methods:

  1. Defining all the textboxes (one for each day) statically in desing mode and moving them (e.cell.Controls.Add(tbDay1)) to each day cell on the OnDayRender event. But there is some problem with viewstate as the textboxes appear 2 times (the ones put in design mode plus the ones in the calendar) and in each page load the contents of the textboxes are duplicated exponentially (test->testtest->testtesttest), it adds 1 semicolon per postback too..but we think its caused by some problem with the updatepanel container.

  2. Defining the textboxes dinamically...we dont know exactly how to include the logic in order to: Load the inital data from database (it would have to be after OnDayRender event somehow, preserving it between page loads (dynamic + viewstate..) but not overwriting new values the user may input...

Any ideas? Preferibly for method one as its already implemented...thanks

A: 

In the end we defined statically a htmlcalendar and 31 textboxes, added a javascript function that places each textbox inside each day div (with some formating) and on the pageload added some bussines logic to enable/disable the textboxes (with FindControl()) depending on the holidays and so..

ase69s