WebForm_DoPostBackWithOptions vs __doPostback(转载)

had an issue with WebForm_DoPostBackWithOptions vs __doPostback. WebForm_DoPostBackWithOptions started showing up on a page and not showing up on other .NET pages. It was a pain in my butt! Because WebForm_DoPostBackWithOptions wasn't working, all my linkbutton had this javascript function rendered and none of the events were firing!
So after looking around I found out that I had some panels that were hidden on the page. And in one of those panels, I have a validation control, if a validation control is "hidden" on the page (the panel's visibility is set to false and later made visible) then .NET adds WebForm_DoPostBackWithOptions to the button controls and thus does not work.
To fix this I had to change the linkbuttons that were not hidden to cause validation to false. (CauseValidation=False). Once I did that, it work! What a pain in the butt!

 

原文地址:http://www.timmaxey.net/archive/2009/03/01/webform_dopostbackwithoptions-vs-__dopostback.aspx

posted @ 2009-11-27 10:53  简单不简单  阅读(674)  评论(0编辑  收藏  举报