Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

I searched for online solution, but i did not get solution for my following problem:

Popup extender when i try to pop up, it appears and disappears immediately after a second.
Kindly suggest..

My code:
===============

HTML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
    .modalBackground
{
      background-color: Yellow;
      filter: alpha(opacity=60);
      opacity: 0.6;
}
 
.modalPopup
{
      background-color:#ffffdd;
      border-width:3px;
      border-style:solid;
      border-color:Gray;
      padding:5px;
      width: 350px;
      height:300px;
}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground" PopupControlID="Panel1" TargetControlID="BtnshowPopup">
        </asp:ModalPopupExtender>
<asp:Button ID="BtnshowPopup" runat="server" Text="Show Popup" />
<asp:Panel id="Panel1" runat="server" CssClass="modalPopup">
<asp:Label ID="lblMsg" runat="server" Text="Here is the Modal Popup Extender. Do You want to continue?" ></asp:Label>
        <br />
<asp:Button ID="btnOk" runat="server" Text="YES" />
        <asp:Button ID="BtnCancel" runat="server" Text="NO" />
        </asp:Panel>
    </div>
    </form>
</body>
</html>
Posted
v5
Comments
Dinakar Kulkarni 6-Apr-15 11:33am    
thanks for integrating the code to one piece.

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