Try this
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
</script>
<style type="text/css">
.modal
{
position:absolute;
z-index:7000px;
top:0px;
left:0px;
background-color:Gray;
filter:alpha(opacity=60);
-moz-opacity:0.6;
opacity:0.6;
}
</style>
</head>
<body>
<form id="frm" runat="server">
<asp:ScriptManager ID="sm" runat="server" />
<asp:Button ID="clickbtnn" runat="server" Text="open popup" />
<asp:Panel ID="Panel1" runat="server" BorderColor="AliceBlue" BorderWidth="2px" Height="350px"
Width="350px" BorderStyle="Solid">
<asp:Button ID="okbtn" runat="server" Text="ok" />
<asp:Button ID="cnlbtn" runat="server" Text="cancel" />
</asp:Panel>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true"
OkControlID="okbtn" CancelControlID="cnlbtn" BackgroundCssClass="modal" TargetControlID="clickbtnn"
PopupControlID="Panel1" />
</form>
</body>
</html>