zoukankan      html  css  js  c++  java
  • 【1】ASP.NET异步(1)

    图标说明了异步的基础认识。

    1.如果没有Ajax,提交之后整个页会刷新(左图)。右图所示的虚线范围区域加入了ajax技术,提交之后只更新了虚线区域的内容,这样看比较直白。

    <form>
    ①<asp:ScriptManager...</asp:ScriptManager> //必须,用于连接Ajax js的连接;
    ②<asp:UpdatePanel ...>
    ③<ContentTemplate>
    ...具体内容...
    <ContentTemplate>

    ④<Triggers>
    ....
    </Triggers>
    </asp:UpdatePanel>
    </form>

    2、一段基础代码

    <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div>
                时间1:<asp:Label ID="Label1" runat="server"></asp:Label>
                <br />
                <br />
                <fieldset style=" 300px; height: 60px">
                    <legend>局部更新</legend>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            时间2:<asp:Label ID="Label2" runat="server"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </fieldset>
                <br />
                <br />
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="显示时间" Width="55px" />
            </div>
        </form>
    View Code
  • 相关阅读:
    matplotlib种类
    matplotlib安装
    Python input保证输入为int类型
    centos7 安装 smplayer
    matplotlib与numpy
    Windows系统pip安装whl包
    python3打开winodows文件问题
    centos7 python3 pip
    Python实战171203统计
    Python实战171202元组访问
  • 原文地址:https://www.cnblogs.com/tinaluo/p/6786610.html
Copyright © 2011-2022 走看看