I have several input and option elements on my page, each (well almost) have an event attached to update some text on the page once they change. I use jQuery which is really really cool :)
I also use Microsofts Ajax framework, utilizing the UpdatePanel. The reason why I do that is that certain elements are created on the page based on some server-side logic. I don't really want to explain why I use the UpdatePanel - even if it could (it can with quite some effort) be rewritten to use only jQuery I still want that UpdatePanel.
You probably guessed it - once I have a postback on the UpdatePanel the jQuery events stops working. I actually was expecting this, since the "postback" is not really a new postback so my code in document.ready that binds the events won't be fired again. I also confirmed my suspicion by reading up on it in the jQuery help libraries.
不管怎么说,在UpdatePanel更新完DOM之后,我仍然有重新绑定控件的问题.我最好需要一个不需要添加更多的解决方案.js文件(jQuery插件)添加到页面上,但可以捕获UpdatePanel的"AfterUpdated",在这里我可以调用我的方法来重新绑定所有表单元素.