2012-10-13 55 views

回答

4

嘗試這種壓延機的選擇更改事件:

protected void MonthCalender1 _SelectionChanged(object sender, EventArgs e) 
{ 
    System.DateTime myDate = MonthCalender1 .SelectedDate; 

    textBox1.Text = myDate.ToString ("dd/MM/yyyy"); 
} 
+2

壓延機已經選擇以下日期property.visit MSDN鏈接:http://msdn.microsoft.com/en-us/library/system.web。 ui.webcontrols.calendar.selecteddates.aspx – 2012-10-13 17:14:01

+0

拍攝,我正在尋找'MonthCalendar'出於一些奇怪的原因。 – chris

+0

@WajidAli:'System :: DateTime^myDate = monthCalendar1-> SelectedDate;'顯示錯誤:'錯誤錯誤C2039:'SelectedDate':不是'System :: Windows :: Forms :: MonthCalendar'的成員\t c:\ users \ 40612010 \ desktop \ hrnimr2 \ hrnimr \ Form1.h ' – Aan