• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

zjw-1009

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

<%# Container.DataItemIndex+ 1%> 给DataList或者gridview添加自动增长列

<ItemTemplate>
        <table border="0" cellpadding="2" cellspacing="2" style="width: 800px">
            <tr>
                <td colspan="2" rowspan="2">
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                        <tr>
                            <td width="100">
                               第<asp:Label ID="Label9" runat="server" Text="<%# Container.ItemIndex+1%>"></asp:Label>楼</td>
                            <td style="border-bottom: #cccccc 1px dotted">
                                作者:<asp:Label ID="Label6" runat="server" Text='<%# Eval("replyName") %>' Width="150px" ></asp:Label>回复于:<asp:Label ID="Label7" runat="server" Text='<%# Eval("replyTime") %>' Width="150px" ></asp:Label></td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                        <tr>
                            <td width="100">
                                <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("photo") %>' /></td>
                            <td valign="top">
                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("replyMessage") %>'></asp:Label></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
            </tr>
        </table>
    </ItemTemplate>

posted on 2008-09-03 03:40  经纬  阅读(616)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3