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 8109699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:30:00+00:00 2026-06-06T01:30:00+00:00

Here is my issue. I have a SearchViewModel that has a large number of

  • 0

Here is my issue. I have a SearchViewModel that has a large number of search criteria, the values simply won’t fit in the URL. I’m currently using Troy Goode's Html.PagedListPager, but it is designed to use Url.Action() to send the parameters in the URL. Here is an example. I don’t think client-side filtering is an option, due to the fact I’ll have a lot of records.

 @Html.PagedListPager(
        (IPagedList)@Model.SearchResults,
        page => Url.Action("Results", 
            new {
                YearBuiltFrom = Model.YearBuiltFrom,
            }
                ))
}

This is a fine solution if you only have one or two simple parameters.

SearchViewModel

  public class SearchViewModel
    {

        public int? page { get; set; }
        public int? size { get; set; }

        [IgnoreDataMember]
        public IPagedList<Property> SearchResults { get; set; }

        public string[] Locations { get; set; }

        [IgnoreDataMember]
        public MultiSelectList LocationOptions { get; set; }
        
        
        public string[] ZipCodes { get; set; }

        [IgnoreDataMember]
        public MultiSelectList ZipCodeOptions { get; set; }


        [Display(Name="Year Built")]
        public int? YearBuiltFrom  { get; set; }
     
        [Display(Name = "Year Built")]
        public int? YearBuiltTo { get; set; }
        public int? SqftFrom { get; set; }
        public int? SqftTo { get; set; }
        public string Bedrooms { get; set; }
        public string Bathrooms { get; set; }
        [DataType(DataType.Date)]
        public DateTime? SalesFrom { get; set; }
        [DataType(DataType.Date)]
        public DateTime? SalesTo { get; set; }
        public int? SaleAmountFrom { get; set; }
        public int? SaleAmountTo { get; set; }
        public int? LandAreaFrom { get; set; }
        public int? LandAreaTo { get; set; }
        
        public string[] Waterfront { get; set; }

        [IgnoreDataMember]
        public MultiSelectList WaterfrontOptions { get; set; }

     
        
        //TODO: Implement LandAreaType as a search parameter
        //public string LandAreaType { get; set; }
        public Boolean? IsVacant { get; set; }
        
        public string[] PropertyFeatures { get; set; }

        [IgnoreDataMember]
        public MultiSelectList PropertyFeatureOptions { get; set; }

    }
  • 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-06-06T01:30:02+00:00Added an answer on June 6, 2026 at 1:30 am

    I am not familiar with such a control. I think that the easiest would be to use javascript to hijack the click on a pager anchor and build a POST request dynamically by cancelling the default redirect that will be caused by the anchor. To build this POST request you could dynamically set the current page value into a hidden field of the search form and trigger the submission of this form so that it performs the search again but with the page parameter changed.

    Let’s take an example:

    <!-- Search form containing all the search criteria fields including the current page number
    @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "searchForm" }))
    {
        @Html.EditorFor(x => x.SearchCriteria)
        <button type="submit">Search</button>
    }
    
    <!-- Here will be displayed the results
    <div id="results">
        @Html.DisplayFor(x => x.SearchResults)
    </div>
    

    now we could subscribe for the click event on the pager:

    $(function() {
        $('#results a').click(function() {
            // get the url of the page link
            var url = this.href;
    
            var page = ... extract the page parameter from the page link
    
            // update a hidden field inside the search form with this value
            $('#page').val(page);
    
            // trigger the search
            $('#searchForm').submit();
    
            // stop the link from navigating to the url it is pointing to
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here's my issue: I have a program in the command line that has access
Here's the issue: I have 2 data contexts that I would like to do
Here's the issue: I have a list of App names that I want to
Having an issue here that I have tried everything I can think of but
I am stuck with a peculiar issue here. I have a script that basically
I'm running a weird issue here. I have code that makes jquery ajax calls
i have done drag and drop using with jquery. here i have issue that
Here's the issue: I have a hook in IE that reacts on WebBrowser.OnNavigateComplete2 event
Here's the issue: I have a JS dropdown for country and state that runs
Here is my issue: I have a large library of code where all of

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.