there is strange behviur with routing , i do not know that am i doing wrong and what i am doing wrong
i am calling a action in a controller when i call it with id it works but when i try to call it without id it do not work
origanlly my global file was like this
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"Default2", // Route name
"admin/manufecturer/Edit/{id}", // URL with parameters
new { controller = "manufecturer", action = "Edit", id = "" }, // Parameter defaultsnew { controller = @"[^\.]*" });
routes.MapRoute(
"Default21", // Route name
"admin/manufecturer/New/{id}", // URL with parameters
new { controller = "manufecturer", action = "New", id = "" }, // Parameter defaults
new { controller = @"[^\.]*" });
but i also tried that with other variation too
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"Default2", // Route name
"admin/manufecturer/Edit/{id}", // URL with parameters
new { controller = "manufecturer", action = "Edit", id = "" }, // Parameter defaultsnew { controller = @"[^\.]*" });
routes.MapRoute(
"Default21", // Route name
"admin/manufecturer/New/", // URL with parameters
new { controller = "manufecturer", action = "New" }, // Parameter defaults
new { controller = @"[^\.]*" });
but without id its not workin , what i am missing ,
Ahtesham