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语句

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

  • 相关阅读:
    JS继承
    Liunx 常用命令2
    团队作业(四)
    OpenEuler树莓派基础实验(无树莓派)
    thread同步测试
    团队作业(三)
    实验二测试
    浅谈JWT。
    monolog使用 brady
    Blazor Server获取Token访问外部Web Api
  • 原文地址:https://www.cnblogs.com/m110/p/8051568.html
Copyright © 2011-2022 走看看