<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication9._Default" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!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>Untitled Page</title> <style type="text/css"> #Panel1 { max-width:220px; max-height:50px; overflow:auto; } </style></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Panel ID="Panel2" runat="server" style="display: none; " HorizontalAlign="Center" BorderColor="Red" BorderWidth="1px"> <asp:Panel ID="Panel1" runat="server" BackColor="#FFFFC0" Style="width: 200px" HorizontalAlign="Center"> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <br /> </asp:Panel> <asp:Button ID="Button3" runat="server" Text="OK" /> </asp:Panel> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="One Line" /> <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Multi Line" /> <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel2" TargetControlID="Button4"> </cc1:ModalPopupExtender> <asp:Button ID="Button4" runat="server" Style="display: none" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> </form></body></html> protected void Button1_Click(object sender, EventArgs e) { this.Label1.Text = "测试"; this.ModalPopupExtender1.Show(); } protected void Button2_Click(object sender, EventArgs e) { this.Label1.Text = "The output should be a VS 2008 project and source that meets the above requirements. The code should be written in C# and make use of .Net 3.5 technologies including WPF."; this.ModalPopupExtender1.Show(); }