You need to set them in the QuerystringParams property of the Pager Control. Here's how we do it:
1: /// <summary>
2: /// Generates a list of QueryString parameters for the given list of <paramref name="queryStringKeys"/>.
3: /// </summary>
4: /// <param name="request">The current request.</param>
5: /// <param name="queryStringKeys">The keys for which to generate parameters.</param>
6: /// <returns>
7: /// A list of QueryString parameters for the given list of <paramref name="queryStringKeys"/>
8: /// </returns>
9: protected static string GenerateQueryStringParameters(HttpRequest request, params string[] queryStringKeys)
10: {
11: StringBuilder queryString = new StringBuilder(64);
12: foreach (string key in queryStringKeys)
13: {
14: if (Engage.Utility.HasValue(request.QueryString[key]))
15: {
16: if (queryString.Length > 0)
17: {
18: queryString.Append("&");
19: }
20:
21: queryString.Append(key).Append("=").Append(request.QueryString[key]);
22: }
23: }
24:
25: return queryString.ToString();
26: }
27:
28: /// <summary>
29: /// Sets up a DNN <see cref="PagingControl"/>.
30: /// </summary>
31: /// <param name="pagingControl">The pager control.</param>
32: /// <param name="totalRecords">The total records.</param>
33: /// <param name="queryStringKeys">The QueryString keys which should be persisted when the paging links are clicked.</param>
34: protected void SetupPagingControl(PagingControl pagingControl, int totalRecords, params string[] queryStringKeys)
35: {
36: pagingControl.Visible = totalRecords != 0;
37: pagingControl.TotalRecords = totalRecords;
38: pagingControl.CurrentPage = this.CurrentPageIndex;
39: pagingControl.TabID = this.TabId;
40: pagingControl.QuerystringParams = GenerateQueryStringParameters(this.Request, queryStringKeys);
41: }