easysearchresults_repeater.ascx
来自「一个不错的站内搜索源代码」· ASCX 代码 · 共 59 行
ASCX
59 行
<%@ Control Language="c#" AutoEventWireup="false" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" Inherits="EasySearchModule.SearchResults" %>
<asp:Literal ID="DocumentationLiteral" Runat="server" Visible="False">
The only thing required for the repeater to work, is that the
ID is set to "EasySearchResultsRepeater" and that this control
inherits from SearchModule.SearchResults.
If you need to add additional code to this page, you can do so
in a standard code behind file, but the code behind file must
then inherit from SearchModule.SearchResults.
Available Columns Are:
-- Title
-- Description
-- Body
-- Url
-- Size
-- Weight (relavancy to search term)
</asp:Literal>
Search Phrase: <%=this.SearchPhrase%><br/>
Items Per Page: <%=this.ItemsPerPage%><br /> (O=All)
Results: <%=this.SearchResultCount%><br />
Message: <%=this.SearchResultsMessage%><br />
<asp:Repeater id="EasySearchResultsRepeater" runat="server">
<ItemTemplate>
<p>
<div class="SearchResult">
<div class="SearchResultTitle">
<asp:HyperLink id="ResultsTitleHyperLink" Runat="server" NavigateUrl='<%#DataBinder.Eval(Container.DataItem, "Url")%>'>
<%#DataBinder.Eval(Container.DataItem, "Title")%>
</asp:HyperLink>
</div>
<div class="SearchResultDesc">
<%#DataBinder.Eval(Container.DataItem, "Description")%>
</div>
<div class="SearchResultUrl">
<%#DataBinder.Eval(Container.DataItem, "Url")%>
</div>
</div>
</p>
</ItemTemplate>
<AlternatingItemTemplate>
<p>
<div class="SearchResultAlt">
<div class="SearchResultTitle">
<asp:HyperLink id="AltResultsTitleHyperLink" Runat="server" NavigateUrl='<%#DataBinder.Eval(Container.DataItem, "Url")%>'>
<%#DataBinder.Eval(Container.DataItem, "Title")%>
</asp:HyperLink>
</div>
<div class="SearchResultDesc">
<%#DataBinder.Eval(Container.DataItem, "Description")%>
</div>
<div class="SearchResultUrl">
<%#DataBinder.Eval(Container.DataItem, "Url")%>
</div>
</div>
</p>
</AlternatingItemTemplate>
</asp:Repeater>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?