zoukankan      html  css  js  c++  java
  • AJAX Control Toolkit——PopupControlExtender(弹出窗口)

    PopupControl is an ASP.NET AJAX extender that can be attached to any control in order to open a popup window that displays additional content. This popup window will probably be interactive and will probably be within an ASP.NET AJAX UpdatePanel, so it will be able to perform complex server-based processing (including postbacks) without affecting the rest of the page. The popup window can contain any content, including ASP.NET server controls, HTML elements, etc. Once the work of the popup window is done, a simple server-side call dismisses it and triggers any relevant script on the client to run and update the page dynamically.

    TargetControlID——附加到的控件的ID

    PopupControlID——弹出显示的控件ID

    Position——弹出控件相对目标控件的位置(Left,Right, Top, Bottom, Center)

    CommitProperty——目标控件要从弹出控件得到的属性值(可选)

    CommotScript——获取弹出控件属性值的脚本

    OffsetX/OffsetY——水平、竖直方向距默认位置的偏移距离

    Animations

    ——OnShow

    ——OnHide

    示例代码:

     1 <asp:ScriptManager ID="ScriptManager1" runat="server" />
    2 <div>
    3 <br />
    4 ToDo:
    5 <asp:TextBox ID="MyTextBox" runat="server" Width="538px"></asp:TextBox>
    6 <br />
    7 <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
    8 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    9 <ContentTemplate>
    10 <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
    11 Width="146px">
    12 <asp:ListItem Text="Scott Guthrie" ></asp:ListItem>
    13 <asp:ListItem Text="Simon Muzio"></asp:ListItem>
    14 <asp:ListItem Text="Brian Goldfarb"></asp:ListItem>
    15 <asp:ListItem Text="Joe Stagner"></asp:ListItem>
    16 <asp:ListItem Text="Shawn Nandi"></asp:ListItem>
    17 </asp:RadioButtonList>
    18 </ContentTemplate>
    19 </asp:UpdatePanel>
    20 </asp:Panel>
    21 <br />
    22 <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" CommitProperty="value"
    23 CommitScript="e.value += ' - SEND A MEETING REQUEST!';" PopupControlID="Panel1"
    24 Position="Bottom" TargetControlID="MyTextBox">
    25 </ajaxToolkit:PopupControlExtender>
    26
    27 </div>

    简单CSS

    .popupControl
    {
    background-color
    :#AAD4FF;
    position
    :absolute;
    visibility
    :hidden;
    border-style
    :solid;
    border-color
    : Black;
    border-width
    : 2px;
    }

      

  • 相关阅读:
    金蝶k3wise 核算项目、辅助资料
    金蝶——“免、抵、退”税操作说明及帐务处理
    阿里云各Linux发行版netcore兼容性评估报告---来自大石头的测试
    金蝶KIS&K3助记码SQL数据库批量刷新
    华为交换机批量加入 Vlan 方法
    华为设备默认console密码
    SQL查询数据并插入新表
    ORACLE删除当前用户下所有的表的方法
    【转】使用Navicat for Oracle新建表空间、用户及权限赋予
    [转]spring mvc注解方式实现向导式跳转页面
  • 原文地址:https://www.cnblogs.com/January/p/2124563.html
Copyright © 2011-2022 走看看