The TextChanged event does not fire.Please help!
-
I have a simple web form with a textbox and a label.I'd like when i enter (or delete )text of the textbox the label will display the current length of the text in the textbox.Here is my code: private void TextBox1_TextChanged(object sender, System.EventArgs e) { Label1.Text=TextBox1.Text.Length.ToString(); } I use the TextChanged event of the TextBox control.I also set the EnableViewState and AutoPostBack property of textbox to true but nothing happened when i enter text to the textbox.However the previous code worked well in Window Form.How to fire this event in Web form?
-
I have a simple web form with a textbox and a label.I'd like when i enter (or delete )text of the textbox the label will display the current length of the text in the textbox.Here is my code: private void TextBox1_TextChanged(object sender, System.EventArgs e) { Label1.Text=TextBox1.Text.Length.ToString(); } I use the TextChanged event of the TextBox control.I also set the EnableViewState and AutoPostBack property of textbox to true but nothing happened when i enter text to the textbox.However the previous code worked well in Window Form.How to fire this event in Web form?
-
It worked but the event just fire when i left the textbox but I'd like it fire when i type the text.Can Ajax resolve this problem?Thanks for reading