JGood
JGood

Reputation: 522

Textbox OnTextChanged and Button Click Event Not Firing

I have textboxes being generated by a repeater that use OnTextChanged with autopostback enabled so that I can know when when the values change. This all works perfect.

The problem starts when I try to click on any buttons on the page. The loss of focus triggers the event for the OnTextChanged; however, the event for my buttons never get fired.

I checked this in the debugger and while debugging if I put a break-point in the page_load it will call both; however, without the break-point it still only calls the OnTextChanged event.

I found this post on JavaScript. If my problem is also JavaScript related, why does the clicking of the button fire in debug mode?

Thanks.

Upvotes: 0

Views: 2721

Answers (1)

Icemanind
Icemanind

Reputation: 48696

Rethink what it is you are trying to do. You should, first of all, not be enabling autopostback. You should be capturing the onBlur event and capturing it from javascript. Have your javascript code do whatever it is your trying to do.

Upvotes: 1

Related Questions