I have a below setup in the controller for Public facing web page
Company -> About -> Partners ( which i want to be accessed as Company/About/Partners )
Action Method
public about(string category)
{
ViewBag.Category = category;
return View();
}
Generation of the link is done as below which is giving me the wrong URL
@Html.ActionLink("Partners & Investors", "About", "Company",new { Category = "Partners" },null)
Wrong Url
Company/About?Category=Partners%20and%20Investors
So the question is how does one generate the correct url that i wanted. What should i do ?
Urls will be generated
automaticallywhen you create newrouteand put it on correct position.Add
Something like this:
Also look at this link: Advanced Routing