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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:23:34+00:00 2026-06-09T03:23:34+00:00

In my limited (2 weeks) experience in asp.net MVC3, for most action methods, I

  • 0

In my limited (2 weeks) experience in asp.net MVC3, for most action methods, I have never needed to add a route registration. But I have noticed that if the action method has an input parameter, then I can’t access the method with a url of the form http://www.mysite.com/myController/myAction/myParameter1/myParameter2/myParameter3 (without the ? mark ) unless I map the route. Is that how its supposed to be?

  • 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-09T03:23:35+00:00Added an answer on June 9, 2026 at 3:23 am

    By default, you already have registered route:

    routes.MapRoute(
                    "Default", // Route name
                    "{controller}/{action}/{id}", // URL with parameters
                    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
                );
    

    it accepts one parameter, named id, so your action:

    public ActionResult MyAction(string id)
    

    will “catch” the request:

    www.mysite.com/MyController/MyAction/parameter_value
    

    and id will get value “parameter_value”.

    If you need more than one parameter (or parameter has to be names something else than “id”), then you have to register new route.

    In case when you have 2 parameters, you will register route like this:

    routes.MapRoute(
                        "Default", 
                        "{controller}/{action}/{parameter1}/{parameter2}", 
                        new { controller = "Home", action = "Index", parameter1 = UrlParameter.Optional, parameter2=UrlParameter.Optional } 
                    );
    

    and your action might be:

    public ActionResult MyAction(string parameter1, int? parameter2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my limited experience, I've been on several projects that have had some sort
Background: 3-4 weeks experience in Silverlight3/C#/.Net and about 3days worth with the RIA Services
I have limited Java Socket experience and all of it using TCP. I am
I have limited experience with JavaME in the past. I've worked in only basic
In my limited experience of working with MySQL I have seen to large apps
I have limited programming experience, and almost none with PHP. However I've been given
I have a Windows 2003 Server that uses IIS to host a legacy ASP.NET
I have limited experience with JSON, and am trying to extract image URLs from
I personally know limited PHP, however I have a script provided by another, that
I have a very limited channel within which to send messages and signatures, and

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.