我试图在ASP.NET上为Calendar对象设置一个新日期,但没有任何改变.这是我的代码: protected void Page_Load(object sender, EventArgs e){ if (Page.IsPostBack) { cld_birth.SelectedDate = new DateTime(2003, 1, 1); }} 尝试
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
cld_birth.SelectedDate = new DateTime(2003, 1, 1);
}
}
尝试设置VisibleDate:
if (Page.IsPostBack)
{
cld_birth.SelectedDate = new DateTime(2003, 1, 1);
cld_birth.VisibleDate = new DateTime(2003, 1, 1);
}
