Showing posts with label modalpopupextender. Show all posts
Showing posts with label modalpopupextender. Show all posts

Tuesday, 27 April 2010

asp.net checkbox modalpopupextender checkbox doesn't check or uncheck

There is an apparent bug in asp.net that when you have a checkbox inside a panel that is acting as a modal popup with the modalpopupextender, that when you try to check or uncheck it, it doesn't work!

I found the following thread, and it seems that quite a few people have had this very same problem.

From reading many posts, it seems that this happens if you do not set the TargetControlID property of the extender correctly.

However, this becomes an issue if you have multiple links, all that show the same extender. To get round this, you can simply create a fake button:

Monday, 26 April 2010

modalpopupextender event fires but does not show

I lost half a day of my life to this silly mistake today.

I had on my page a panel, with a modal popupextender. When I clicked a link that ran a serverside mdlPopup.show() or a client side $('mdlPopup').show(), the events fired, but no modal popup showed.

The reason for this was because I had set the "visible" attribute of my panel to "false", rather than setting the style of it to "display:none"!

Silly....