c# - MVC routing via Global.asax.cs not hitting model -


I am trying to route my controller, I do not know what I'm doing wrong, and its Bothered me

global.sx.css
  protected void application_Start () {area registration. Registrar All Ares (); FilterConfig.RegisterGlobalFilters (GlobalFilters.Filters); RouteConfig.RegisterRoutes (RouteTable.Routes); BundleConfig.RegisterBundles (BundleTable.Bundles); } {Registration} "" "" "" "" "" "" "" "" "" "" "" " Group name = "", section name = ""}});   

controller
  public action details description (string group name, string section name) {// code}        

Empty register routes should not be in your ASAX, this is your RouteConfig < / Code> static class.

Root Config.Case

  Public Static Class Route Config {Public Static Blank Register Routes {// Your Route Configuration}}  < / Pre> 

Edit: Also, as mentioned in the answer to Brian Menace , your path should be the same:

  routes.MapRoute (" Default "," {controller} / {action} / {id} ", new {controller =" home ", action =" index ", id = UrlParameter.Optional});   

Where the names in parentheses map the values ​​in the default object.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -