1个回答
展开全部
<form id="form1" runat="server">
<div>
<asp:Label ID="lblDate" runat="server"></asp:Label>
</div>
<asp:Calendar ID="Calendar1" runat="server"
onselectionchanged="Calendar1_SelectionChanged"></asp:Calendar>
</form>
后台代码:
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
lblDate.Text = Calendar1.SelectedDate.ToString();
Calendar1.Visible = false;
}
<div>
<asp:Label ID="lblDate" runat="server"></asp:Label>
</div>
<asp:Calendar ID="Calendar1" runat="server"
onselectionchanged="Calendar1_SelectionChanged"></asp:Calendar>
</form>
后台代码:
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
lblDate.Text = Calendar1.SelectedDate.ToString();
Calendar1.Visible = false;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询