Last post May 11, 2017 04:53 PM by dysert
May 11, 2017 03:21 PM|dysert|LINK
I have a table on my asp page that contains exactly one row with two cells. Each cell is a calendar control. I haven't been able to figure out how to reset the calendar controls. Here's a snippet of what I'm trying...
Control cal = (Control)this.Table1.Rows.Cells;
Calendar cal1 = (Calendar)cal;
cal1.VisibleDate = DateTime.Today;
This doesn't work, though (run-time error), because it can't cast a table cell to a calendar. What do I need to do to get at my calendar so I can reset it? Thanks.
May 11, 2017 04:53 PM|dysert|LINK
Well I figured it out myself. Stupid me. I was traversing the collection trees to get to the calendar, but I eventually came to realize I could reset the calendar directly, without going through the table.