• 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>

  • 相关阅读:
    DIV+CSS规范命名大全集合
    display:none与visibility:hidden的区别
    为什么无法发起qq临时会话,必须添加好友?如何设置才能临时会话?
    gif动态图片去白边,杂边
    【原创】[PS技巧]如何制作翘角纸条的阴影效果
    ......那么Win8.1怎么去掉文件夹?
    Win8增加了快速启动功能......
    不间断图片滚动JS
    FlatList
    react native 布局
  • 原文地址:https://www.cnblogs.com/evan51/p/3867000.html
Copyright © 2020-2023  润新知