If we have a ModalPopupExtender with the id ‘modPopup_ModalPopupExtender’, and need to display or hide it in javascript, we can easily do this using the $find() function.

Let’s see this in action:

ASPX:

modalPopupjs

Javascript:

modalPopupjs2

The code is pretty self explanatory. Hope that helps.