If you read the documentation for
ModalPopup[
^] you will understand what is happening.
TargetControlID - The ID of the element that activates the modal popup.
If you look at the documentation you will see a sample for activating the ModalPopup from server-side code.