In my opinion it will be a good idea to Use the Markup rather then the server side code.
<
ajaxToolkit:ModalPopupExtender ID="MPE" runat="server"
TargetControlID="Button2"
PopupControlID="MoveMe"
DropShadow="true"
OkControlID="Loginbuttonhere"
CancelControlID="lnkBtnCloseColHelp"
Regards
Ahsan Sarfraz
Dont forget to mark as answered if the info is useful