I am trying to hide or replace string in the URL
after mapping to controller from view.
View
<a href='@Url.Action("Product", "Index", new { prodID [email protected]
})'>
Controller
public ActionResult Product()
{
return View(model);
}
Now I am getting this in URL like this http://localhost:9210/Index/Product?prodID=1
But I want url
like this http://localhost:9210/Index/Product/1
So how can I do this? Please help
/Product/{prodID}
, either in your route config or through attributes.