zoukankan      html  css  js  c++  java
  • webform 基础

    Repeater的使用:

    <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <div class="kuang">
                        <div class="left">
                            <img src="<%#Eval("touxiang") %>" />
                        </div>
                        <div class="name"><%#Eval("name") %></div>
                        <div class="ziliao"><%#Eval("nationname")  %></div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
    using(DBDataContext con=new DBDataContext())
            {
                Repeater1.DataSource = con.people;
                Repeater1.DataBind();
            }

     --------------------

    -AutoPostBack="true"                  --此属性才可在后台调用DropDownList的方法

    if (IsPostBack == false)               ---仅第一次加载有效

    </AlternatingItemTemplate>                   --交替绑定数据

    document.getElementById("HiddenField1").value = this.getElementsByTagName("img")[0].getAttribute("src");             --取图片路径的方法

    Literal:在Html中输出代码(一般用于<script><script> )                --类似于reponse,比reponse更好

     <div style="clear: both;"></div>               --清流

    -----------------------------

    用html页面 发送请求:

    建立一个html页面网站,建立一个 一般处理程序 (handler.ashx)

    <form action="handler.ashx" method="post">

      <input type="text" name="username"/>

    </from>

    handler.ashx页面中:

      string username=context.request["username"];    --取html页面中的内容

      using(dbdatacontext con=){}    --可以执行linq语句

     --------------------------------

  • 相关阅读:
    mysql 优化总结
    mac、linux 查看端口占用程序
    mysql 优化之查询缓存(mysql8已经废弃这个功能)
    laravel 中的 toSql 获取带参数的 sql 语句
    mysql 统计 group by 之后的 group 的个数
    shell 循环语句
    shell 中的流程控制关键字
    为什么要用babel-polyfill
    gulp --watch直接退出,并没有监听
    nodejs安装使用express
  • 原文地址:https://www.cnblogs.com/m110/p/8051568.html
Copyright © 2011-2022 走看看