不可访问“case21.index1.myCal_OnSelectionChanged(object,System.EventArgs)“,因为它受保护级别限制。
<asp:Calendat id=”Calendar1” OnSelectionChanged=”myCal_OnSelectionChanged” OnVisibleMonthChanged=”mycal_OnVisibleMonthChanged”></asp:Calendar>
private void myCal_OnSelectionChanged(object sender, System.EventArgs e)
{
int seldate,i;
string s="";
seldate=Calendar1.SelectedDates.Count;
for(i=0;i<seldate;i++)
{
s+=Calendar1.SelectedDates.ToString();
}
show.Text=s;
}
private void mycal_OnVisibleMonthChanged(object sender, MonthChangedEventArgs e)
{
show.Text=" 当前月 " + "" + e.NewDate.ToString() + " 上个月: " + e.PreviousDate.ToString();
}