Why Is Mvc Actionlink Not Rendering Correctly?
I am passing this : <%: Html.ActionLink('Edit', 'EditCRMRequest', 'CRM', new { Id = item.Id })%> and I am getting in browser : http://something.com/CRM/EditCRMRequest?Length
Solution 1:
Correct way:
<%: Html.ActionLink("Edit", "EditCRMRequest", "CRM", new { Id = item.Id },null)%>
No overload method like this:
Html.ActionLink(stringtext, string action, string controller, object routeValues)
If you write like above, Lenght=3
is represent "CRM". Controller name behave as routeValues
Correct method is:
Html.ActionLink(stringtext, string action, string controller, object routeValues, object htmlAttributes)
Post a Comment for "Why Is Mvc Actionlink Not Rendering Correctly?"