Every server side event means reloading the page so you should be fine.
If you have partial page update then you have to do it like this:
In your caller control, probably button, add OnClientClick="doModal()"
function doModal() {
}
Alternate solution is to use ajaxToolkit like this:
<ajaxToolkit:ModalPopupExtender ID="mpeProgress" runat="server" TargetControlID="pnlProgress"
PopupControlID="pnlProgress" BackgroundCssClass="modalBackground" DropShadow="true" />
<asp:panel id="pnlProgress" runat="server" style="background-color: #EEEEEE; display: none;<br mode=" hold=" /> width: 400px" xmlns:asp="#unknown">
<div style="padding: 28px; height: 80px; text-align: center">
Loading, please wait
<asp:image id="imgWait" runat="server" imageurl="~/images/indicator-big.gif" borderwidth="0px" />
</div>
</asp:panel>