I need url for editing friends in my ASP.NET MVC site like this:
site.com/friend{x}/edit
where {x} - id of friend.
So, how should I use my ActionLinks, Controller name and Routings ?
Assuming your control is called FriendController, try adding a custom route such as:
routes.MapRoute(
"Friends", // Route name
"friend{id}/{action}", // URL with parameters
new { controller = "Friend", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
Then you would construct your ActionLinks, etc. exactly as normal.