使用Repeater布局表单

<asp:Repeater ID="Repeater1" runat="server" >
        <HeaderTemplate>
          <table style="width:100%; text-align:left">
            <tr style="background-color:#b7b5b5; height:25px; text-align:center">
              <th style="width:4%;">
                <asp:LinkButton ID="LinkButton5" runat="server" Text="ID" OnClick="LinkButton5_Click"></asp:LinkButton></th>
              <th style="width:16%">
                名称</th>
              <th style="width:6%">
                &nbsp;图片</th>
              <th style="width:10%">
                型号</th>
               <th style="width:12%">
                是否推荐</th>
              <th style="width:8%">
                <asp:LinkButton ID="LinkButton2" runat="server" Text="排序号" OnClick="LinkButton2_Click"></asp:LinkButton></th>
               <th style="width:8%">
                <asp:LinkButton ID="LinkButton1" runat="server" Text="更新时间" OnClick="LinkButton1_Click"></asp:LinkButton></th>
              <th style="width:8%">
               <asp:LinkButton ID="LinkButton4" runat="server" Text="访问量" OnClick="LinkButton4_Click"></asp:LinkButton></th>
              <th style="width:8%">
                <asp:LinkButton ID="LinkButton3" runat="server" Text="询单量" OnClick="LinkButton3_Click"></asp:LinkButton></th>
              <th style="width:8%">
                发布状态</th>
              <th style="width:6%">
                下架</th>
              <th style="width:6%">
                详细</th>
            </tr>
        </HeaderTemplate>
        <ItemTemplate>
          <tr style="background-color:#f1f1f1" οnmοuseοver="javascript:menu_over(this)" οnmοuseοut="javascript:menu_out(this)">
            <td style="text-align:center">
              <asp:Label runat="server" ID="Label20" Text='<%# Eval("FProductid") %>' />
            </td>
            <td>
              &nbsp;<asp:Label runat="server" ID="Label23" Text='<%# transstring(Eval("FProName")) %>' />
            </td>
            <td style="text-align:center">
            <a id="tip" href="#">
            <img alt="" id="Img1" width="30px" height="30px" style="border:double 1pt #cccccc" src='<%# "../Product_smallImage/"+DataBinder.Eval(Container.DataItem,"FPhoto")%>'/>
                <span id="tip_info">
                <asp:Image ID="Image1" runat="server" width="240px" height="180px" ImageUrl='<%# "../Product_smallImage/"+DataBinder.Eval(Container.DataItem,"FPhoto")%>' /></span>
                </a>
            </td>
            <td>
              &nbsp;<asp:Label runat="server" ID="Label13" Text='<%# transstring1(Eval("FModel")) %>' />
            </td>
            <td style="text-align:center">
              <asp:LinkButton ID="LinkButton6" runat="server" CommandName="LinkButton6"
              CommandArgument='<%#DataBinder.Eval(Container.DataItem,"FProductid")%>' Text='<%# Eval("FRmd") %>'></asp:LinkButton>
            </td>
            <td>
              &nbsp;<asp:Label runat="server" ID="Label15" Text='<%# Eval("FSortID") %>' />
            </td>
            <td>
              <asp:Label runat="server" ID="Label16" Text='<%# transstring2(Eval("FSendDate")) %>' />
            </td>
            <td>
              &nbsp;<asp:Label runat="server" ID="Label17" Text='<%# Eval("FQuantity") %>' />
            </td>
            <td>
              &nbsp;<asp:Label runat="server" ID="Label18" Text='<%# Eval("FSeeks") %>' />
            </td>
            <td style="text-align:center">
              <asp:LinkButton ID="delete2" runat="server" CommandName="delete2"
              CommandArgument='<%#DataBinder.Eval(Container.DataItem,"FProductid")%>' OnClientClick="return confirm('你确定要更改该产品的发布状态吗?')">取消发布</asp:LinkButton>
            </td>
            <td style="text-align:center">
              <asp:LinkButton ID="delete1" runat="server" CommandName="delete1" Text='<%# Eval("FPcar") %>'
              CommandArgument='<%#DataBinder.Eval(Container.DataItem,"FProductid")%>' OnClientClick="return confirm('你确定要下架该产品吗?')"></asp:LinkButton>
            </td>
            <td style="text-align:center">
           <a href='productman.aspx?FProductid=<%# DataBinder.Eval(Container.DataItem,"FProductid") %>'>
              <asp:Label runat="server" ID="Label22" Text='查看' /></a>
            </td>
          </tr>
        </ItemTemplate>
        <FooterTemplate>
          </table>
        </FooterTemplate>
      </asp:Repeater>

转载于:https://www.cnblogs.com/chinahongzk/archive/2008/04/26/1172244.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值