zoukankan      html  css  js  c++  java
  • Atlas UpdatePanel代码简介

    <html >
    <head runat="server">
        <title>Atlas之UpdatePanel</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <!-- 引入Atlas类库 -->
        <atlas:ScriptManager ID="m1" runat ="server" EnablePartialRendering="true" ></atlas:ScriptManager>
        <!-- 普通.net控件 -->
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
        </asp:DropDownList>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /><br />
        <!-- 数据提交时出现提示等待状态 -->
        <atlas:UpdateProgress ID="ps" runat ="server" >
            <ProgressTemplate >
                数据加载中...
            </ProgressTemplate>
        </atlas:UpdateProgress>
        <!-- 需要动态更新的部份放到updatepanle里面(更新不刷新) -->
        <atlas:UpdatePanel ID="p1" runat ="server" >
            <!-- 更新部分内容 -->
            <ContentTemplate >
                <asp:Label ID="Label1" runat="server"></asp:Label>
            </ContentTemplate>
            <!-- 更新条件 -->
            <Triggers> 
                <!-- 控件的某个值改变 -->
                <atlas:ControlValueTrigger ControlID ="DropDownList1" PropertyName ="SelectedValue" />
                <!-- 控件的某个事件激发 -->
                <atlas:ControlEventTrigger ControlID ="Button1" EventName ="Click" />
            </Triggers>
        </atlas:UpdatePanel>
        </form>
    </body>
    </html>

    此代码实现的效果:改变DropDownList1选项或单击Button1后页面(这里仅是Label1显示的内容)更新但是不刷新!

  • 相关阅读:
    【C++】几个简单课本例题
    【汇编】AX内容依次倒排序
    【汇编】课本第三章例题
    【汇编】补码的理解+标志寄存器的相关探索
    【记录】台式机的组装
    【记录】.bin文件 到 .vdi文件的转换教程
    【汇编】1.汇编环境的搭建:DOSBox的安装
    docker的常用命令,以及postgressql的启动
    Docker中容器的备份、恢复和迁移
    C# 常见面试问题汇总
  • 原文地址:https://www.cnblogs.com/chy710/p/517913.html
Copyright © 2011-2022 走看看