Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,我在 asp.net 中创建了一个网页,并且在该网页中我正在使用 Asp 日历控件。每当用户从该日历控件中选择以前的日期时,我想显示消息框我该怎么做,请建议我任何解决方案。
您可以使用日历控件的 Selection_Change 事件:
void Selection_Change(Object sender, EventArgs e) { if(Calendar1.SelectedDate < Date.Now) { Response.Write("<script language=javascript>alert('previous date selected');</script>); } }