我的aspx上有这个代码:
<asp:TextBox ID="datepicker" runat="server" CssClass="input-date date-icn small-label" AutoCompleteType="BusinessZipCode" ></asp:TextBox>
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" Visible="false" ></asp:Calendar>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
这是我背后的代码:
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
datepicker.Text = Calendar1.SelectedDate.ToString();
}
protected void Show(object sender, EventArgs e)
{
Calendar1.Visible = true;
}
如何在文本框中(在aspx中)编写事件,以便它可以调用函数“Show”并显示日历?