how to use modalpopup Extender control in Ajax?

aswinialuri-19361
Posted by aswinialuri-19361 under ASP.NET AJAX category on | Points: 40 | Views : 1085
example for modalpopup extender control

<%@ 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 runat="server">
<title></title>
<style type="text/css">
.pop
{
background-color:Olive;
filter: alpha(opacity=60);
opacity: 0.6;
}
.popup
{
background-color:Silver;
border-width:3px;
border-style:double;
height:340px;
width:340px;

}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
Are you sure you want to know the answer?. <asp:Button ID="Button1" runat="server" Text="Button" />
<asp:Panel ID="Panel1" runat="server" CssClass="popup">
<p>Hi welcom to Modal popup Control in Ajax </p><br />
<asp:Button ID="Button2" runat="server" Text="cancel" />
</asp:Panel>


<asp:ModalPopupExtender ID="Panel1_ModalPopupExtender" runat="server"
DynamicServicePath="" Enabled="True" TargetControlID="Button1" PopupControlID="Panel1" BackgroundCssClass="pop" DropShadow="true" CancelControlID="Button2" PopupDragHandleControlID="Panel1" RepositionMode="RepositionOnWindowResizeAndScroll"></asp:ModalPopupExtender>


</div>
</form>
</body>
</html>

I hope you understood

Comments or Responses

Login to post response