btnModalPopUp is the control's targetcontrolid. Add a hiddenfield and use the hidden field's ID as the targetcontrolid of the modal popup extender. This will fix your problem.
Also, make your panel visible for double checking by adding:
pnlPopUp.Visible = true;
And also, check if the containing gridview is not empty
, cause if it is, the popup won't show.
Please mark as answer if this fixed your problem