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

posted on 2014-07-25 02:25  将来时  阅读(237)  评论(0编辑  收藏  举报