Check this example
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<style type="text/css">
.modalBackground
{
background-color: Black;
filter: alpha(opacity=90);
opacity: 0.8;
}
.modalPopup
{
background-color: #FFFFFF;
border-width: 3px;
border-style: solid;
border-color: black;
padding-top: 10px;
padding-left: 10px;
width: 300px;
height: 140px;
}
</style>
<script type = "text/javascript">
window.onload = function () {
setTimeout(function () {
$find("mp1").show();
});
};
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="mp1" BehaviorID="mp1" runat="server" PopupControlID="Panel1"
TargetControlID="lnkFake" CancelControlID="btnClose" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" align="center" Style="display: none">
This is an ASP.Net AJAX ModalPopupExtender Example<br />
<asp:Button ID="btnClose" runat="server" Text="Close" />
</asp:Panel>
</form>
</body>
</html>