AFAIK, the Modal Popup Extender has no direct way to determine its visibility state from code behind. This post describes a workaround for that. The idea here is to wire up handlers that the MPE fires just before it’s about to show the popup (showing...