Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
CSS
XML
<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>


ASP.NET
<body>
<form id="form1" runat="server">


<asp:ScriptManager ID="sm" runat="server" >

<asp:Button ID="clickbtnn" runat="server" Text="click"/>

<asp:Panel ID="Panel1" runat="server" BorderColor="AliceBlue" BorderWidth="2px" Height="350px" Width="350px" BorderStyle="Solid" >
<asp:Button ID="okbtn" runat="server" Text="click"/>
<asp:Button ID="cnlbtn" runat="server" Text="click"/>




<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" OkControlID="okbtn" CancelControlID="cnlbtn" BackgroundCssClass="modal" TargetControlID="clickbtnn" PopupControlID="Panel1">


</form>
</body>
Posted
Updated 4-Feb-14 21:40pm
v6

Try this

XML
<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>
 
Share this answer
 
Comments
Karthik_Mahalingam 5-Feb-14 4:13am    
asp:ModalPopupExtender change it to ajaxToolkit:ModalPopupExtender if your prefix for AJAX is ajaxToolkit
kishorebt 5-Feb-14 4:19am    
<ajaxToolkit:ModalPopupExtender ID="MPE" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1"
BackgroundCssClass="modalBackground" CancelControlID="can">



NOT WORKING
kishorebt 5-Feb-14 4:22am    
See im working on ajax so <ajax> tool kit ive inserted.
Karthik_Mahalingam 5-Feb-14 4:25am    
did u added ajax reference like this
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
kishorebt 5-Feb-14 4:27am    
no hw to do that ????
 
Share this answer
 
v2
Comments
kishorebt 5-Feb-14 4:00am    
ya even tried with that im not getting a popup. so can u simplify with my code bcoz its very simple code
King Fisher 5-Feb-14 4:02am    
your c# code?
kishorebt 5-Feb-14 4:03am    
i don't have c# code.
its just a popup i think c# is no need
King Fisher 5-Feb-14 4:14am    
have you ?
this.ModalPopupExtender1.Show();
kishorebt 5-Feb-14 4:16am    
no ive not did that in my c# is that necessary to do..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900