I need to add 1 event for textbox into my webpage (created in ASP.NET with C#) and I was declared in the Page_Load function and into asp syntax:
protected void Page_Load(object sender, EventArgs e)
{
textbox1.TextChanged += new EventHandler(textbox1_TextChanged);
}
public void textbox1_TextChanged(object sender, EventArgs e)
{
if (textbox1.Text == "ABCD")
{
Image1.Visible = true;
textbox1.Enabled = false;
}
}
and into asp page i used this statement:
<asp:TextBox Width="200" ID="textbox1" runat="server"></asp:TextBox>
I did debug and found that not execute textbox1_TextChanged function
Why ?