Panel 最大高度


  1. <%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication9._Default" %>
  2. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head runat="server">
  6.     <title>Untitled Page</title>
  7.     <style type="text/css">
  8.     #Panel1 {
  9.   max-width:220px;
  10.   max-height:50px;
  11.   overflow:auto;
  12.     }
  13.     </style>
  14. </head>
  15. <body>
  16.     <form id="form1" runat="server">
  17.         <asp:ScriptManager ID="ScriptManager1" runat="server" />
  18.         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  19.             <ContentTemplate>
  20.                 <asp:Panel ID="Panel2" runat="server" style="display: none; " HorizontalAlign="Center" BorderColor="Red" BorderWidth="1px">
  21.                     <asp:Panel ID="Panel1" runat="server" BackColor="#FFFFC0" Style="width: 200px"
  22.                         HorizontalAlign="Center">
  23.                         <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  24.                         <br />
  25.                     </asp:Panel>
  26.                     <asp:Button ID="Button3" runat="server" Text="OK" />
  27.                 </asp:Panel>
  28.                 <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="One Line" /> 
  29.                 <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Multi Line" />
  30.                 <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel2"
  31.                     TargetControlID="Button4">
  32.                 </cc1:ModalPopupExtender>
  33.                 <asp:Button ID="Button4" runat="server" Style="display: none" Text="Button" />
  34.             </ContentTemplate>
  35.         </asp:UpdatePanel>
  36.     </form>
  37. </body>
  38. </html>
  1. protected void Button1_Click(object sender, EventArgs e)
  2.         {
  3.             this.Label1.Text = "测试";
  4.             this.ModalPopupExtender1.Show();
  5.         }
  6.         protected void Button2_Click(object sender, EventArgs e)
  7.         {
  8.             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.";
  9.             this.ModalPopupExtender1.Show();
  10.         }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值