I found what I was looking for in the following post:
Modal: Can I execute server code on OK before executing onOKScript
Remove cancelcontrolid, and okcontrolid from your modalpopupextender..
In your codebehind use the normal OnClick event for the buttons.
Then in the code behind use ModalPopupExtender.hide()
You have then more control and can do something after the OK button has been pressed.
If the cancel button is pressed, you only need to call the ModalPopupExtender.hide()
I added the following code to the event for the Apply button and it closed the ModalPopup.
So now the ModalPopup works great.
The user types in data and clicks a button. That fires a server-side event that perform actions
on the server and closes the ModalPopup all in one swell foop!
protected void btnAddTextItem_Apply_Click(object sender, EventArgs e)
{
// Add your server-side event code here.
// Hide the ModalPopup.
this.mpeAddText_ModalPopupExtender.Hide();
}