I'm beginer in asp.net mvc. I try the routing. but all route formats using by first defined route value. Example all views url finishing with "index" i don't want this url format. and i want localhost:56609/Cuisines/Detail/4/thai but program showing localhost:56609/Cuisines/getCuisineDetail/6/thai . How to do this explain me please.
RouteConfig
routes.MapRoute( _
name:="RestaurantDetail", _
url:="{controller}/{action}/{id}/{title}", _
defaults:=New With {.controller = "Restaurants", .action = "Index", .id = UrlParameter.Optional, .title = UrlParameter.Optional} _
)
routes.MapRoute( _
name:="Cuisines", _
url:="{controller}/Detail/{id}/{title}", _
defaults:=New With {.controller = "Cuisines", .action = "getCuisineDetail", .id = UrlParameter.Optional, .title = UrlParameter.Optional} _
)
routes.MapRoute( _
name:="Default", _
url:="{controller}/{action}", _
defaults:=New With {.controller = "Home", .action = "Index"} _
)
View
@<p>@Html.ActionLink(Model(i).Name, "getCuisineDetail", New With {.id = Model(i).CusineID, .title = OnlineSiparis.UrlEditor.CheckUrl(Model(i).Name)}) </p>
