I have my View page where i have this code:
<%: Html.ActionLink("Edit", "Edit", "Admin", new { id = item.Username })%>
And here is my controller
public ActionResult Edit(String id)
{
String x = id;
}
But String x have value "null".Action Result is in Controller Admin so that is not mistake.Also I use item.Username to show results in table and it works fine.
If I try with this in View
<%: Html.ActionLink("Edit", "Edit", "Admin", new { id = item.Username }, null)%>
I get error 404.
Does anybody know where is my mistake?