Hello, Michal, thank you.
Sorry, here is my code:
<project:SearchResults ID="SearchResultList" OnOnSearchCompleted="SearchResultList_OnOnSearchCompleted" IgnoreTransformations="True" NoResultsText="" runat="server">
<ItemTemplate>
<%# SetRowContext(Container) %>
<div>
<%# HighlightFoundText(SearchResultRow.SearchResultItem, SearchResultRow.Teaser) %>
</div>
</ItemTemplate>
</project:SearchResults>
Here is SetRowContext
method
protected string SetRowContext(Control container)
{
var searchResultItem = (SearchResultItem)(container as RepeaterItem)?.DataItem;
if (searchResultItem == null) return string.Empty;
SearchResultRow = new SmartSearchResultRow(searchResultItem, SmartSearchContext, DocumentProvider);
return string.Empty;
}
And there is OnOnSearchCompleted
event handler (from Kentico 11)
protected void SearchResultList_OnOnSearchCompleted(bool visible)
{
var numberOfResults = SearchContext.CurrentParameters?.NumberOfResults ?? 0;
ResultsFound.Text = numberOfResults.ToString();
}
So, when I added object sender
parameter to OnOnSearchCompleted
event handler, in ascx file, in row
<project:SearchResults ID="SearchResultList" OnOnSearchCompleted="SearchResultList_OnOnSearchCompleted" IgnoreTransformations="True" NoResultsText="" runat="server">
it says that Parameters do not match to the method signature