Override code for the AspNetPager paging control UrlRewritePattern parameter Settings
- 2020-05-27 04:42:41
- OfStack
<AspNet:AspNetPager ID="AspPages" runat="server" CustomInfoHTML=" The first %CurrentPageIndex%/%PageCount% Page, each page %PageSize% Article, %RecordCount% article "
FirstPageText=" Home page " LastPageText=" back " NextPageText=" Under the 1 page " AlwaysShow="true" CssClass="PP"
CurrentPageButtonClass="cpb" PageIndexBoxType="DropDownList" PrevPageText=" on 1 page "
ShowCustomInfoSection="Left" ShowPageIndexBox="Never" SubmitButtonText=" Go "
TextAfterPageIndexBox=" page " PageSize="10" TextBeforePageIndexBox=" Go to the " Height="25px"
NumericButtonCount="4" Width="98%" CenterCurrentPageButton="True" CustomInfoTextAlign="Left"
HorizontalAlign="Right" OnPageChanged="AspPages_PageChanged"
UrlRewritePattern="/Knowledge/Tag/%TagID%/%Category%/pv{0}" UrlPaging="True" EnableUrlRewriting="True">
</AspNet:AspNetPager>
protected void AspPages_PageChanged(object sender, EventArgs e)
{
string TagID = GetRequest.GetString("TagID");
AspPages.UrlRewritePattern = string.IsNullOrEmpty(TagID) ? "/Knowledge/Tag/%TagID%/%Category%/pv1" : "/Knowledge/Tag/%TagID%/%Category%/pv{0}";
BindRptChateau(TagID);
}
<rewrite url="^/Knowledge/Tag/(\d+)/(\d+)/pv(\d+)$" to="~/Search/SearchKnowledgeTag.aspx?Keywords=$1&TagID=$1&Category=$2&page=$3" processing="stop"></rewrite>