It doesn't work, i have a test.aspx with a Label and a Calendar, with
following code
protected void Page_Load(objec t sender, EventArgs e)
{
Label1.Text = Calendar1.Visib leDate.ToString ();
}
The Label1 show "1/1/0001 0:00:00" when the page first loaded, currently
month/year is Nov, 2005
When I click the nextMonth link, Calendar current displaying Dec, 2005,
however the Label1 show "1/1/0001 0:00:00",
When I click the nextMonth again, The Calendar now is Jan, 2006, but the
Label is "1/12/2005 0:00:00"
Then I click prevMonth, The Calendar back to Dec 2005, the Label shows
"1/1/2006 0:00:00"
It seem the VisibleDate always keep the previous value, and initial
undefined when the page first load.
Anyone can explain the behavior?
Or how you guys implements a event calendar?
Thanks in advance
"Brock Allen" <ba****@NOSPAMd evelop.com>
???????:b8***** *************** ******@msnews.m icrosoft.com...
Calendar.Visibl eDate
-Brock
DevelopMentor
http://staff.develop.com/ballen How can I get the month and year a calendar control current
displaying?
My problem is I want to load a list of event to a calendar so that it
display difference style if there a event for a day.
My initial idea is load all events from database and store it in a
DataTable. In the DayRender event, loop thr the DataTable and see if
it equal to e.Day and alter the style if that is.
However when the event table is large, it hurt performance. So how get
I know what month and year the calendar control is current displaying,
thus I can only load the events of specified month and year only?
Thanks in advance.
Jason