<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="SearchResult2.aspx.cs" Inherits="BookDemo.QA.SearchResult2" %>
<%@ Import Namespace="BookDemo.QA" %>
<%@ MasterType VirtualPath="~/Master.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    搜索关键字：<asp:Label ID="lblKeyword" runat="server" ForeColor="Red"></asp:Label><br />
    搜索结果：<asp:Label ID="lblResultCount" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
    条<br />
    搜索用时：<asp:Label ID="lblSearchCost" runat="server"></asp:Label>毫秒    
    <div>
        <ul>
            <asp:Repeater ID="rptResult" runat="server">
                <ItemTemplate>
                    <li style="margin-bottom: 20px;">
                        <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("Question.Title","{0}").HighlightKeywords(KeyWord) %>'
                            NavigateUrl='<%# Eval("Question.Id","~/Question.aspx?id={0}&kw="+KeyWordUrlEnCode) %>'></asp:HyperLink>[<asp:Label
                                ID="Label1" runat="server" Text='<%# Eval("Question.QACatalog.Name","{0}").HighlightKeywords(KeyWord) %>'></asp:Label>]<br />
                        <b>提问内容：</b><asp:Label ID="Label2" runat="server" Text='<%# Eval("Question.Text","{0}").HighlightKeywords(KeyWord) %>'></asp:Label><br />
                        <b>最佳答案：</b><asp:Label ID="Label3" runat="server" Text='<%# Eval("Answers[0].Text","{0}").HighlightKeywords(KeyWord) %>'></asp:Label><br />
                        <b>回答用户：</b><asp:Label ID="Label4" runat="server" Text='<%# Eval("Answers[0].QAUserInfo.UserName") %>'></asp:Label>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
</asp:Content>
