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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:31:11+00:00 2026-05-11T20:31:11+00:00

On this page: http://nerddinnerbook.s3.amazonaws.com/Part4.htm After the controller is added, I can browse to http://localhost:xxxx/dinners

  • 0

On this page:

http://nerddinnerbook.s3.amazonaws.com/Part4.htm

After the controller is added, I can browse to http://localhost:xxxx/dinners and it works as expected. My question is how does it know to use “Dinners”? Where is “Dinners” located? My controller is named DinnersController so how did the word Dinners become meaningful. I don’t see it in my Linq to SQL or anywhere else. I’m sure I’m overlooking something obvious.

Here is the code:

    //
        // HTTP-GET: /Dinners/

        public void Index()
        {
            Response.Write("<h1>Coming Soon:

Dinners”);
}

        //
        // HTTP-GET: /Dinners/Details/2

        public void Details(int id)
        {
            Response.Write("<h1>Details DinnerID:

” + id + “”);
}

Where is “Dinners” coming from?

Thank you for any help.

EDIT: I read further in the article before I posted and saw about the global.asax, but I don’t understand how it mapped to dinners with this:

 public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

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

        }

        protected void Application_Start()
        {
            RegisterRoutes(RouteTable.Routes);
        }
    }
  • 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-11T20:31:11+00:00Added an answer on May 11, 2026 at 8:31 pm

    ASP.NET MVC favors Convention over Configuration. Meaning it will look for a controller with a Controller suffix and not include it as part of the URL and only include the prefix to Controller. So if you have HomeController you could visit /Home/ just as DinnersController means /Dinners/. This happens as part of the ASP.NET MVC framework itself.

    If you look at the default route in Global.asax you’ll see it uses a format for the URL that looks like…

    "{controller}/{action}/{id}"
    

    This means take the name of the controller and the name of the action and point the request to that method.

    So for DinnersController Index action method it would look like /Dinners/Index.

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

Sidebar

Related Questions

This page http://winteradagency.com/Arvin/incentives/lenders.htm looks good in all browsers except IE6. The thing that is
Reading this page http://code.google.com/p/closure-stylesheets/ , I can't seem to find any documentation explaining how
This page -- http://webdesign.about.com/od/localization/l/blhtmlcodes-punc.htm -- shows a list of HTML characters that can be
Like this page http://webappsledger.com/ This is loading pop-up in iframe. Can we same type
According to this page: http://jqueryui.com/demos/tabs/#ajax I can have the content of tabs in separate
in this page http://api.jquery.com/category/effects/ when you put 'up'(keyboard) and 'down',then put 'enter',it will go
On this page: http://www.colorz.fr/#!/work/ You can see the image scrolls into/out of the direction
On this page: http://www.palosverdes.com/sandbox/9slategrey/index.cfm I'm trying to put in a new menu (the one
On this page: http://www.anasiamusic.com/bio.html in the body text (Ana Sia's DJ crate is a
On this page: http://code.google.com/apis/accounts/docs/OAuth2UserAgent.html Google gives instructions for doing oauth with client side applications

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.