views:

24

answers:

0

I often want to have a ModalPopupExtender , but I want to control it from the code behind. In this particular case, I want to make my ModalPopupExtender come up when I click an "edit" button on a GridView row or when I click a "New Item" button on my page. For this reason it makes more sense to control the ModalPopupExtender from the code behind.

There is an example of how to hack this here by creating a hidden button. Creating a hidden button seems like a good solution in some situations, but I am wondering if there is not a better solution that is not a hack. What other technologies would be more appropriate for solving my problem?