Url routing suggestion in asp.net mvc.....
Posted
by Pandiya Chendur
on Stack Overflow
See other posts from Stack Overflow
or by Pandiya Chendur
Published on 2010-05-06T04:09:28Z
Indexed on
2010/05/06
4:18 UTC
Read the original article
Hit count: 242
I have an action link in one of my view page
<%=Html.ActionLink("Details", "Details", new { id = Model.Id })%>
and redirects me to page which has a url like this http://localhost:1985/Materials/Details/2
instead of this i would like to have my url as http://localhost:1985/Materials/Details/steel
material name instead of Id... Is this possible...... This is my controller action method,
public ActionResult Details(int id)
{
var material = consRepository.GetMaterial(id);
return View("Details", material);
}
© Stack Overflow or respective owner