Problem:
When I tick the checkbox inside Gridview, modalPopup opens but its BackgroundCssClass is not being applied to it, and the popup just shows up at the left side corner of the page without changing the background and opacity.
I had installed Ajax TookKit for Framework 4.5 in Visual Studio 2013
Here is the code:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<head runat="server">
<style type="text/css">
.modalBackground
{
background-color: black;
filter: alpha(opacity=90);
opacity: 0.8;
-moz-opacity:0.8;
}
.modalPopup
{
background-color: #FFFFFF;
border-width: 2px;
border-style: solid;
border-color: black;
padding-top: 10px;
padding-left: 10px;
width: 300px;
border-radius:10px;
/*height: 140px;*/
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div id="MpdalPopUpDiv">
<asp:Label ID="Label1" runat="server" Text="Label" Visible="false"></asp:Label>
<cc1:ModalPopupExtender ID="mp1" runat="server" BackgroundCssClass="modalBackground" PopupControlID="Panel1" TargetControlID="Label1" CancelControlID="btnClose"></cc1:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" align="center" Visible="false">
<div>
//div contents html code
</div>
</asp:Panel>
</div>
</form>
</body>
Also tried:
<cc1:ToolkitScriptManager ID="ToolKitScriptManager1" runat="server"></cc1:ToolkitScriptManager>
in place of:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
Please reply what is going wrong in the code above?