开发者

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.

开发者_JAVA技巧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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜