Tim Maxey .NET Technology Blog & Resources

WebForm_DoPostBackWithOptions vs __doPostback

Hi there guys, 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!


Feedback

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar Hi Tim,
Great work man. 7/18/2009 7:58 AM | Promothash

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar you saved me, thank you. 7/20/2009 1:31 AM | Eyob Beshah

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar Thanks a loooooooooooot....
Its really a pain .
You saved lot of my time in debugging it 7/30/2009 7:26 AM | Raghu Nandan

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar I changed to EnableClientScript property from true to false for all validation controls on the page. So the validation will run on the server side and there will be postback. I have no other options other than this quick solution. 9/21/2009 6:54 AM | maahy

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar dude you rock. 9/22/2009 8:57 AM | nitin

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar Thanks super man 11/26/2009 9:49 PM | hdl

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar When I met this problem, I almost crazy about this. then I gave up and changed another thing.
Eventually I know the reason because of you.
Thanks. :) 12/3/2009 12:36 AM | Daniel Min

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar You are the Man!!

I was struggling with this one for hours..This post saved me.

Thanks
Karthik 3/18/2010 7:53 PM | Karthikeyan

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar Nice one here... it worked for me 4/13/2010 2:14 PM | Ross

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar I am so glad you found this! I had been wracking my brains trying to find a solution to this "feature." Thanks! 4/21/2010 12:50 PM | Kristin Teague

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar i was getting mad why linkbuttons was working differently on different pages,
wasted hours, stopped wasting right after found your post. 9/27/2010 7:01 AM | kluciks

# re: WebForm_DoPostBackWithOptions vs __doPostback

Gravatar thanks you thank you thank you. saved me a ton of time! 9/28/2010 10:21 AM | steve

Post a comment





 

Please add 4 and 3 and type the answer here: