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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:06:36+00:00 2026-05-29T06:06:36+00:00

In my page I ve to pass multiple values to controller. My URL looks

  • 0

In my page I ve to pass multiple values to controller.

My URL looks something like :
http://blah/Search/Page/?type=new&keywords=blahblah&sortType=Date

Is Passing multiple values as query string good practice in MVC ? or We can have slash separated URL, by using introducing custom routing?

NB: Lets consider all the values in my query string, are not secure / sensitive data.

  • 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-29T06:06:37+00:00Added an answer on May 29, 2026 at 6:06 am

    I wouldn’t consider it a bad practice, as long as it’s not senstive data. It just depends if you want to write a custom route in your global.asax to handle it or not. The custom routes provide a cleaner url forsure. Also, for more savy users if they understand the concept on your site, it’s more intuitive.

    So consider this:

    http://baseballcards/topps/1980      // search for baseball cards made by topps in the 1980s
    http://recipes/deserts/pies         // search for a desert recipe that are pies  
    http://code/csharpe/linq             // search for csharp code that has linq examples
    

    In these examples we can almost read the url like a sentence, making it more intuitive, giving a user the ability to plug and play. It clearly denotes the query almost like a breadcrumb, indicating exactly what the context will be. I personally like this. But either way is a good approach.

    To extend with more parameters:

    routes.MapRoute(
                "SearchRecipes",                                              
                "Search/Recipes/{category}/{type}",                           
                new { controller = "Search", action = "Recipes", category = "all" , type = ""}  
     );
    

    Some examples:

    Search/Recipes/Deserts/Pie
    Search/Recipes/Dinner/Beef
    Search/Recipes/Lunch/Salads
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to pass multiple values to a controller. The controller looks like Page(string
How to pass multiple values with $.post ? I'm tryed like this $.post(page.php, {field:
I'm using MVC, I've got a search page, and I want to pass multiple
how pass multiple values to paypal. I used it in paypal submission page <input
I have multiple forms on a page which pass an id to the controller
How do you pass $_POST values to a page using cURL ?
Is it allowable to pass parameters to a web page through the URL (after
Good evening guys, I'm trying to pass multiple checkbox values through AJAX and process
I have multiple slider forms in my page: like this one . For just
I am going to develop a search page where I will have multiple fields

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.