<%@ Page Language="C#" MasterPageFile="~/ListMasterPage.master" AutoEventWireup="true" CodeFile="BlogSearchResult.aspx.cs" Inherits="SearchResult" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="bloger_name" DataSourceID="SqlDataSource1" AllowPaging="True" EmptyDataText="没有搜索到您想要的内容" PageSize="8">
        <Columns>
            <asp:TemplateField HeaderText="bloger_name" SortExpression="bloger_name" Visible="False">
                <EditItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("bloger_name") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("bloger_name") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="bloger_name" DataNavigateUrlFormatString="~/LogView.aspx?bb={0}"
                DataTextField="bloger_title" HeaderText="为您搜索到的博客" />
        </Columns>
    </asp:GridView>
    &nbsp; &nbsp;
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DesertEagleConnectionString %>"
        OnSelecting="SqlDataSource1_Selecting" SelectCommand="SELECT [bloger_name], [bloger_title], [bloger_enable], [is_forbid] FROM [DE_bloger] WHERE (([bloger_enable] = @bloger_enable) AND ([bloger_title] LIKE '%' + @bloger_title + '%') AND ([is_forbid] = @is_forbid))">
        <SelectParameters>
            <asp:Parameter DefaultValue="True" Name="bloger_enable" Type="Boolean" />
            <asp:QueryStringParameter Name="bloger_title" QueryStringField="bloger_title" Type="String" />
            <asp:Parameter DefaultValue="False" Name="is_forbid" Type="Boolean" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

