Archive

Posts Tagged ‘OnRowCommand’

Break out of WebForm_DoPostBackWithOptions Hell

October 28, 2009 2 comments

I have been going nuts all day trying to get a link button to fire its command event and cause a postback in a GridView control.  On this particular page, whenever I click on the link, I get a WebForm_DoPostBackWithOptions instead of __doPostback, and of course I never hit the grid’s command event in my page behind.

The solution?  Set causesvalidation=”false” in the link button and the command event will fire.   Why, I don’t know, this just works and hopefully you’ll find this post before having to spend too many hours trying to figure it out.

Advertisements
%d bloggers like this: