为什么在Calendar控件中使用SelectedDate属性无效?

更新于
2026-09-24 19:12:56
5阅读来源:SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计114个文字,预计阅读时间需要1分钟。

为什么在Calendar控件中使用SelectedDate属性无效?

我在ASP.NET页面上的Calendar控件设置了一个新日期,但没有任何变化。以下是我的代码:

csharpprotected void Page_Load(object sender, EventArgs e){ if (Page.IsPostBack) { cld_birth.SelectedDate=new DateTime(2003, 1, 1); }}

我试图在ASP.NET上为Calendar对象设置一个新日期,但没有任何改变.这是我的代码:

为什么在Calendar控件中使用SelectedDate属性无效?

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); }

本文共计114个文字,预计阅读时间需要1分钟。

为什么在Calendar控件中使用SelectedDate属性无效?

我在ASP.NET页面上的Calendar控件设置了一个新日期,但没有任何变化。以下是我的代码:

csharpprotected void Page_Load(object sender, EventArgs e){ if (Page.IsPostBack) { cld_birth.SelectedDate=new DateTime(2003, 1, 1); }}

我试图在ASP.NET上为Calendar对象设置一个新日期,但没有任何改变.这是我的代码:

为什么在Calendar控件中使用SelectedDate属性无效?

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); }