我想当我单击按钮时我的 textbox1 必须更改,但 textbox3 不为什么它不起作用?
protected void Page_Load(object sender, EventArgs e)
{
TextBox3.Text = DateTime.Now.ToLongTimeString();
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = DateTime.Now.ToLongTimeString();
}
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button"/>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</asp:UpdatePanel>
当我单击Button1我的TextBox3更改 为什么?