<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:Button ID="show_popup" runat="server" Text="Show popup" />
<asp:Label ID="Label1" runat="server">
<ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="show_popup" PopupControlID="Panel1">
<asp:Panel ID="Panel1" runat="server">
<asp:TextBox ID="TextBox1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click1" />
</form>
</body>
</html>
protected void Button1_Click1(object sender, EventArgs e)
{
show_popup.Visible = false;
Label1.Text = TextBox1.Text;
mpe.Hide();
}