zoukankan      html  css  js  c++  java
  • asp.net网站前台通过DataList展示信息的代码

    //aspx页面中

    <asp:DataList ID="dlZP" runat="server" CssClass="hong">
                                                <ItemTemplate>
                                                    <table align="center" cellpadding="0" cellspacing="0" width="266">
                                                        <tr>
                                                            <td>
                                                                <span class="hong" style="color: #000000">·<a class="huise" href="#"
                 onClick="window.open('ShowLeaguerInfo.aspx?id=<%#DataBinder.Eval(Container.DataItem,"id") %>','','height=258, width=479, top=200, left=200')"><%#DataBinder.Eval(Container.DataItem,"title") %></a></span></td>
                                                        </tr>
                                                        <tr style="color: #000000">
                                                            <td>
                                                                <img height="1" src="images/line.gif" width="266" /></td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:DataList>

    //cs文件中

     if (!IsPostBack)  //!IsPostBack避免重复刷新加载页面
            {
                //获取前6条分类供求信息
                dlZP.DataSource = operation.SelectLeaguerInfo(true, "公司公告", 6);//dlZP与前台的id相同
                dlZP.DataBind();
             }

  • 相关阅读:
    MQ 2035(MQRC_NOT_AUTHORIZED)
    C# 构造函数中调用虚方法的问题
    Oracle bug 使用max或min函数into到一个char类型报字符缓冲区太小的错误
    windows2003 64位 iis6.0 运行32位web应用程序
    .NET安装和配置Oracle数据访问组件(ODAC)
    WMS函数组:10.创建采购订单
    报表:BOM展开程序
    WMS函数组:9.交货单过帐3(BDC)
    WMS函数组: 7.交货单行项目除
    WMS函数组:1.检查ZPB2是否存在
  • 原文地址:https://www.cnblogs.com/QiuJL/p/4524282.html
Copyright © 2011-2022 走看看