Hello I have actions SomethingEditor, SomethingDelete, SomethingSave, SomethingAdd and i want set these routing: site/Something/Editor, site/Something/Delete, site/Something/Save etc
How i can do it?
Hello I have actions SomethingEditor, SomethingDelete, SomethingSave, SomethingAdd and i want set these routing: site/Something/Editor, site/Something/Delete, site/Something/Save etc
How i can do it?
Using the following routes:
routes.MapRoute(null, "site/Something/Editor", new { controller = "Something", action = "SomethingEditor" });
routes.MapRoute(null, "site/Something/Delete", new { controller = "Something", action = "SomethingDelete" });
routes.MapRoute(null, "site/Something/Save", new { controller = "Something", action = "SomethingSave" });
routes.MapRoute(null, "site/Something/Add", new { controller = "Something", action = "SomethingAdd" });
UPDATE:
I strongly recommend using a seperate controller for each entity with the following route:
routes.MapRoute(null, "site/{controller}/{action}");