ModalPopupExtender, User Control And Button PostBack

Posted: Wednesday, January 11, 2012 in asp.net

I spent some time today to figure out why, a button on a page didn’t not postback after clicking on it.

The scenario is like this,

I have a user control and it’s been calling from the ModalPopupExtender based on some logic, but not always. And I have another button for some other function in the page. But this button didn’t cause postback even the ModalPopupExtender was in hide mode. Later on I figured out the reason.

The reason was the use control which was calling from ModalPopupExtender had some validation controls. so even the ModalPopupExtender was in hide mode still it was causing the validations. So I set CausesValidation=”false” on my button and then the postback started working.

Advertisements
Comments
  1. news says:

    I like the blog site layout ! How do you make it!? It is so nice.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s