I'm using the calendar web server control in a scheduling app.
Basically: user clicks on a date, and a list of the day's activities show up to the right of the control.
Well, I thought it would be nice if the calendar indicated which days were scheduled. To do this, I add all the days with activities to the calendar.selecteddates collection. ASP formats these cells differently, and I get the effect I wanted.
The problem: when the user clicks on a date, the collection is cleared and the newly selectected date is added to the (now empty) collection. I have been dealing with this by resetting the collection in the calendar.onselectionchanged event. So *every* time a user clicks a date, I have to add as many as 365 items to this collection.
This is definitely not pretty, and I am afraid that it will prove to be a drag on server resources. Is there a way to simply cancel the user's selection (but still know, programattically, which date s/he selected?) and avoid all of this? I'm sure many of you have done something similar -- any suggestions?
Thanks! -Brad
Basically: user clicks on a date, and a list of the day's activities show up to the right of the control.
Well, I thought it would be nice if the calendar indicated which days were scheduled. To do this, I add all the days with activities to the calendar.selecteddates collection. ASP formats these cells differently, and I get the effect I wanted.
The problem: when the user clicks on a date, the collection is cleared and the newly selectected date is added to the (now empty) collection. I have been dealing with this by resetting the collection in the calendar.onselectionchanged event. So *every* time a user clicks a date, I have to add as many as 365 items to this collection.
This is definitely not pretty, and I am afraid that it will prove to be a drag on server resources. Is there a way to simply cancel the user's selection (but still know, programattically, which date s/he selected?) and avoid all of this? I'm sure many of you have done something similar -- any suggestions?
Thanks! -Brad