1
날짜 선택을 변경하면 HolidayList의 모든 이벤트의 글꼴 색상을 변경하고 싶습니다. 선택한 날짜에 이벤트가 있으면 label5도 변경되지만 페이지를로드 할 때 모든 이벤트의 글꼴 색을 변경하고 싶습니다.캘린더에서 이벤트의 글꼴 색상을 변경하고 싶습니다.
private Hashtable HolidayList; /*Will be kept all holidays in it.*/
protected void Page_Load(object sender, EventArgs e)
{
HolidayList = Getholiday();
string date = calendar.TodaysDate.ToShortDateString();
if (HolidayList[date] != null) Label5.Text = (string)HolidayList[date];
else Label5.Text = "";
}
private Hashtable Getholiday()
{
Hashtable holiday = new Hashtable();
holiday["9/5/2013"] = "Mudirin Ad gunu";
holiday["9/7/2013"] = "Dostumun Ad gunu";
holiday["10/28/2013"] = "Tetil";
return holiday;
}
protected void calendar_SelectionChanged(object sender, EventArgs e)
{
string date = calendar.SelectedDate.ToShortDateString();
if (HolidayList[date] != null) Label5.Text = (string)HolidayList[date];
else Label5.Text = "";
}