TextBox.TextChanged event not firing!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys

I'm trying to get ASP.NET to do something when someone starts typing in my
textbox, but it doesn't want to fire the codebehind!

I've got AutoPostBack set to to True on my textbox, and the following wireup
in my code-behind...

this.txtMyTextBox.TextChanged += new System.EventHandler(this.TextChange);

TextChange function looks something like...

private void TextChange
{
Response.Write("test!");
}

But when I type in the text box nothing happens! What have I missed?!

Cheers


Dan
 
Try set your AutoPostBack to true.

You do realise however, this will cause the page to post back and reload.
Not a very nice user experience.

Unless you loading some other data on the page, i would suggest you use
javascript for this
 
My AutoPostBack is set to True, it still doesn't work.

This is an intranet application, so I wanted to see what the speed was like
- might be okay, might not :)

Any other suggestions?
 
Works fine for me:

Try attached

dhnriverside said:
My AutoPostBack is set to True, it still doesn't work.

This is an intranet application, so I wanted to see what the speed was
like
- might be okay, might not :)

Any other suggestions?
 
sorry Grant.... attached? Can't see any attachments? Using the Microsoft web
reader thingy.... can you email me? dan at musoswire.com

Ta mate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top