zoukankan      html  css  js  c++  java
  • Repeater绑定页面的方法

    <th>
                            序号
                        </th>
                        <th>
                            编号
                        </th>
                        <th>
                            书名
                        </th>
                        <th>
                            作者
                        </th>
                        <th>
                            类别
                        </th>
                        <th>
                            国家
                        </th>
                        <th>
                            语言
                        </th>
                        <th>
                            是否显示
                        </th>
                       
                        <th>
                            发表
                        </th>
                       
                        <th>
                            描述
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    <asp:Repeater ID="rptList" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="trhover(this);" onmouseout="trout(this);">
                                <td>
                                    <input type="checkbox" name="Countryckb" value='<%#Eval("BookId") %>' />
                                </td>
                                <td>
                                    <%--绑定序号的格式--%>
                                    <%#Container.ItemIndex+1 %>
                                </td>
                                <td>
                                   <%#Eval("BookId")%>
                                </td>
                                <td>
                                    <%#Eval("BookName")%>
                                </td>
                                <td>
                                    <%#Eval("Author")%>
                                </td>
                                <td>
                                    <%#Eval("TypeName")%>
                                </td>
                                <td>
                                    <%#Eval("CountryName")%>
                                </td>

                                <td>
                                    <%#Eval("LanguageName")%>
                                </td>
                               
                                <td>
                                    <%--绑定bool类型的格式,三元表达式--%>
                                    <%#Convert.ToBoolean(Eval("IsShow"))?"显示":"隐藏"%>
                                </td>
                                <td>
                                    <%--绑定时间的格式--%>
                                    <%#string.Format("{0:yyyy-MM-dd}",Eval("PublishDate"))%>
                                </td>
                                <td>
                                    <%#Eval("Description")%>
                                </td>
                                <td>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#string.Format("AddBook.aspx?id={0}&name={1}",Eval("BookId"),Eval("BookName")) %>'>编辑</asp:HyperLink>
                                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%#string.Format("DeleteBook.aspx?id={0}",Eval("BookId")) %>'>删除</asp:HyperLink>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>

  • 相关阅读:
    第二十节:Scrapy爬虫框架之使用Pipeline存储
    第十九节:Scrapy爬虫框架之Middleware文件详解
    第十八节:Scrapy爬虫框架之settings文件详解
    第十七节:Scrapy爬虫框架之item.py文件以及spider中使用item
    第十六节:Scrapy爬虫框架之项目创建spider文件数据爬取
    第一节:python提取PDF文档中的图片
    第十五节:Web爬虫之selenium动态渲染爬取
    H5移动开发底部导航-博客园老牛大讲堂
    ajax跨域通信-博客园老牛大讲堂
    博客园模板2--博客园老牛大讲堂
  • 原文地址:https://www.cnblogs.com/evan51/p/3867000.html
Copyright © 2011-2022 走看看