views:

32

answers:

1

HI I have the following routing table

routes.MapRoute(null,
    "Save", // Route name               
    new { controller = "Package", action = "Save"} // Parameter defaults
);

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

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

When i am typing the path /Package/Save it is showing me page not found.

Can anybody please tell me what i am doing wrong?

THanks

+2  A: 

The first route is configured incorrectly - name of route, then the pattern and then the defaults.

Also make sure you have a Package controller and a Save action method on it.

Per Hornshøj-Schierbeck
Definitely something wrong with that first route.
womp
Check out http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx
Per Hornshøj-Schierbeck