-1
私はウェブページ上の日付の人口を見ることができます。ただし、TextBox
には表示されません。 TextBox
に表示するように選択されたカレンダーの日付が必要です。Calendarコントロールの日付をTextBoxコントロールに設定するにはどうすればよいですか?
<%@ Page Language="VB" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
TextBox1.Focus()
End Sub
Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write("You selected: " &
Calendar1.SelectedDate.ToShortDateString())
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Using the Calendar Control</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Calendar ID="Calendar1" runat="server"
OnSelectionChanged="Calendar1_SelectionChanged">
</asp:Calendar>
</div>
</form>
</body>
</html>
削除タグ;ノイズ減少。 – Bugs