Any button inside a ModalPopupExtender hides the modal. It doesn't matter if the button is set as CancelControlID or OkControlID.
In the following example, both btnFoo and btnBar closes the modal.
```
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="btnOpen" runat="server" Text="Open" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
CancelControlID="btnModalCancel" OkControlID="btnModalOkay" TargetControlID="btnOpen"
PopupControlID="Panel1">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" Style="display: none" runat="server">
<asp:Button ID="btnModalCancel" runat="server" Text="Cancel" />
<asp:Button ID="btnModalOkayl" runat="server" Text="OK" />
<asp:Button ID="btnFoo" runat="server" Text="Foo" />
<asp:Button ID="btnBar" runat="server" Text="Bar" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
```
In the following example, both btnFoo and btnBar closes the modal.
```
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="btnOpen" runat="server" Text="Open" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
CancelControlID="btnModalCancel" OkControlID="btnModalOkay" TargetControlID="btnOpen"
PopupControlID="Panel1">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" Style="display: none" runat="server">
<asp:Button ID="btnModalCancel" runat="server" Text="Cancel" />
<asp:Button ID="btnModalOkayl" runat="server" Text="OK" />
<asp:Button ID="btnFoo" runat="server" Text="Foo" />
<asp:Button ID="btnBar" runat="server" Text="Bar" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
```