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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:46:21+00:00 2026-05-23T10:46:21+00:00

I have the following area routes setup. context.MapRoute( Admin_default3, Admin/{controller}/{action}/{id}/{id2}/{id3}, new { action =

  • 0

I have the following area routes setup.

context.MapRoute(
    "Admin_default3",
    "Admin/{controller}/{action}/{id}/{id2}/{id3}",
    new { action = "Index" }
);
context.MapRoute(
    "Admin_default2",
    "Admin/{controller}/{action}/{id}/{id2}",
    new { action = "Index"}
);

context.MapRoute(
    "Admin_default",
    "Admin/{controller}/{action}/{id}",
    new { action = "Index", id = UrlParameter.Optional }
);

When a controller action is hit I do something like the following where I place the params into readable variable names.

public ActionResult Search(Guid? id, int? id2, bool? id3)
{
    Guid? source = id;
    int daysOld = id2;
    bool includeNonEnglish = id3;

    //.... Action!
}

Should I continue that way? Should I create a plethora of routes?

thank you

  • 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-23T10:46:22+00:00Added an answer on May 23, 2026 at 10:46 am

    I would create more routes. That way, you have things like:

    Html.ActionLink(title, "Action", "Controller", new { source = <value>, daysOld = <value>, includeNonEnglish = <value> });
    

    Instead of:

    Html.ActionLink(title, "Action", "Controller", new { id = <value>, id2 = <value>, id3 = <value> });
    

    Among other things (like AJAX calls with jQuery, where you use Json for specifying parameters). It would make things more readable. It would also help if you’re using, or going to use, T4MVC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have the following route defined in my only area:- context.MapRoute( Search_default, Search/{controller}/{action}/{id},
I have the following route data object newsRoute = new { Area = Admin,
i have an Area called Members and the following registered routes in the MembersAreaRegistration
I have following code which on save from the admin area creates a duplicate
In my XUL I have the following code fragments: <map name=KeypadMap> <area href=javascript:pad('A') coords=1,1,31,31
I have some text area field in my grails application. I got the following
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
In my application I have controller named Snippets both in default area (in application
I have a controller called votes_controller.rb . In that file there is the following
I have the following code that creates a draggable and droppable element/area. And when

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.