Hi Experts,
When i try to use modalpopup extender in asp.net using VS 2008, I cannt able to show the popup, whenthe click button event runs the popup shows and goes off, i think auto even postback of button event makes me trouble, Below i provide my code, kindly have an look and let me know where i went wrong,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModalPopUp.aspx.cs" Inherits="ModalPopUp" %>
<%@ 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 id="Head1" runat="server">
<title></title>
<style type="text/css">
.modalBackground
{
background-color: Yellow;
filter: alpha(opacity=60);
opacity: 0.6;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="min-height: 700px; height: 307px;">
<asp:Button ID="Button1" runat="server" Text="Click here to show the modal" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" BackgroundCssClass="modalBackground"
runat="server" CancelControlID="btnCancel" OkControlID="btnOkay"
TargetControlID="Button1" PopupControlID="Panel1" Drag="true"
PopupDragHandleControlID="PopupHeader">
</asp:ModalPopupExtender>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div id="Panel1" runat="server">
<div id="popup_Container" runat="server">
<div id="PopupHeader" runat="server">
<div id="TitlebarLeft" runat="server">Popup Header</div>
<div id="TitlebarRight" runat="server"></div>
</div>
<div id="popup_Body" runat="server">
<p>
This is a simple modal dialog
</p>
</div>
<div id="popup_Buttons" runat="server">
<input id="btnOkay" value="Done" runat="server" type="button" />
<input id="btnCancel" value="Cancel" type="button" runat="server" />
</div>
</div>
</div>
</div>
</form>
</body>
</html>
Sathish Kumar S