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!

posted @ Sunday, March 01, 2009 8:53 PM

Print

Comments on this entry:

# re: WebForm_DoPostBackWithOptions vs __doPostback

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

# re: WebForm_DoPostBackWithOptions vs __doPostback

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

# re: WebForm_DoPostBackWithOptions vs __doPostback

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

# re: WebForm_DoPostBackWithOptions vs __doPostback

Left by maahy at 9/21/2009 6:54 AM
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.

# re: WebForm_DoPostBackWithOptions vs __doPostback

Left by nitin at 9/22/2009 8:57 AM
Gravatar
dude you rock.

# re: WebForm_DoPostBackWithOptions vs __doPostback

Left by hdl at 11/26/2009 9:49 PM
Gravatar
Thanks super man

# re: WebForm_DoPostBackWithOptions vs __doPostback

Left by Daniel Min at 12/3/2009 12:36 AM
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. :)

Your comment:



 (will not be displayed)


 
 
 
Please add 8 and 3 and type the answer here:
 

Live Comment Preview:

 

Over 13 years of Internet experience and website marketing. Tim Maxey's Tech Blog. Set out to help the lives of others by making their programming easier. No one is the "best" programmer, every good programmer knows that, or should. Always keep learning and if you do not like it, get out of it. Do what makes you happy! My main purpose is to help youth and also anyone for that matter learn they can make a good living in technology!