I'm trying to create a page. It is very simple like when I change one textbox value, another one changes automatically without leaving the field. I used TextChanged event. But I have to leave the field to change another field value. Any help?
The aspx file :
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
The aspx.cs file :
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
TextBox2.Text = TextBox1.Text;
}
I'm kinda newbie in aspx and c#. Please help me.
use event 'OnkeyPress' not 'OnTextChanged'