I'm seriously going crazy with this.
Here is what is in my Global.asax
routes.MapRoute("BlogDetails", "Blogs/{id}/{title}", new { controller = "Blogs", action = "Details", id = "" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
Those are the only two routes I have.
When I try to access
http://mysite/Blogs/Edit/1 it doesn't work I get this error
The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Details(Int32)' in 'mysite.Controllers.BlogsController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Why does this keep happening?
Thanks
I should also add my controller code looks like this
//
// GET: /Blogs/Edit/5
[Authorize]
public ActionResult Edit(int id)
{
// do a bunch of stuff and return something
}