//C# Code
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
TextBox2.Text = TextBox1.Text;
}
<h2 style="font-style: italic">
<asp:Label ID="Label5" runat="server" Text="Residental Address : "></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox>
</h2>
<h2 style="font-style: italic">
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" Text="Both Same" />
</h2>
<h2 style="font-style: italic">
<asp:Label ID="Label9" runat="server" Text="Native Address :"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine"></asp:TextBox>
</h2>
答案 0 :(得分:0)
单击复选框后是否跟踪PageLoad事件,并查看文本框是否在代码中的某个位置被重置? 否则应该可以。