ASP.NET Calendar对象如何设置SelectedDate属性以避免不兼容问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计116个文字,预计阅读时间需要1分钟。
我尝试在ASP.NET上的Calendar控件中设置一个新日期,但没有任何变化。以下是我的代码:
csharpprotected 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); }
本文共计116个文字,预计阅读时间需要1分钟。
我尝试在ASP.NET上的Calendar控件中设置一个新日期,但没有任何变化。以下是我的代码:
csharpprotected 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); }

