Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 383863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:19:31+00:00 2026-05-12T15:19:31+00:00

I have a grid with contact information which I need to be able to

  • 0

I have a grid with contact information which I need to be able to page through.

All the plumbing is already in place, with one last detail. Paging is done through a simple p Querystring parameter, e.g. http://www.myurl.com/grid?p=3 would be the third page; the repository is automatically fetching the right data, and also the total count of items. The size of each page is defined somewhere else and I don’t need to worry about that in the query string.

However, I support searching etc. as well. The search term searched for in denoted as q in my Querystring. So now I can have a combination: http://www.myurl.com/grid?q=tom&p=2 which searches for “tom” and pulls the second page of results.

The problem I face now, since the q (or other) parameters may be present in the query string, how do I create a pager for this (which would need to keep the original parameters, so if I click on “page 2” it needs to go from

  • www.myurl.com/grid?a=1&b=xyz&q=tom

    to

  • www.myurl.com/grid?a=1&b=xyz&q=tom&p=2

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:19:31+00:00Added an answer on May 12, 2026 at 3:19 pm

    I asked a similar question yesterday. Maybe you want to check out
    Preserve data in .net mvc

    following is the code copied from Steve Sanderson’s book

    public static class PagingHelpers
    {
        public static string PageLinks(this HtmlHelper html, int currentPage,
        int totalPages, Func<int, string> pageUrl)
        {
            StringBuilder result = new StringBuilder();
            for (int i = 1; i <= totalPages; i++)
            {
                TagBuilder tag = new TagBuilder("a"); // Construct an <a> tag
    
                tag.MergeAttribute("href", pageUrl(i));
                tag.InnerHtml = i.ToString();
                if (i == currentPage)
                    tag.AddCssClass("selected");
    
    
                result.AppendLine(tag.ToString());
            }
            return result.ToString();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid and I need to dynamically replace a control that resides
I have a grid that has multiple rows. I want to hide/show one of
I have a grid bound to a BindingSource which is bound to DataContext table,
I have a grid, which I want to add a button at the top
I have a grid of images/buttons, and I want the user to be able
I have grid in my ASP.NET page (actualy it's Telerik RadGrid). There is GridButtonColumn
I have Grid which will render a calendar, and I'm provided with an ArrayList<CalendarEventEntity>
I am using vb.net code. I have grid view, please see the code below:
I have a grid laid out like so; +---------+---------+ | Image | Details |
I have a grid of UIImageViews. The images names come from a sqlite3 database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.