Thoughts, Tips and Tricks on what I'm currently do for a living. Currently most of my spare time is spent on contributing to Akka.NET.

Wednesday, January 31, 2007

Show and Hide a ModalPopupExtender from javascript

To show a modal popup handled by a ModalPopupExtender from javascript you need to set the BehaviorID property:
<ajaxToolkit:ModalPopupExtender...
BehaviorID="MyModalPopupExtender"
... /> 
The script for showing and hiding the popup:
<script language="javascript">
   function hidePopup()
   {
       $find('MyModalPopupExtender').show();
   }
   function hidePopup()
   {
       $find('MyModalPopupExtender').hide();
   }
</script>

1 comment: