-2

A bottom'd like code samples ActionLink (LinkText,Action,ControlName,AreaName,RoutesValue,html attribute) I looked at the sites do not have all of these together Thanks

moj kho
  • 35
  • 2
  • 7
  • There are many overloads for Html.ActionLink(), check out the documentation: https://msdn.microsoft.com/en-us/library/system.web.mvc.html.linkextensions.actionlink%28v=vs.118%29.aspx – Luke May 26 '15 at 09:10
  • Unfortunately, I searched but could not find the command to be perfect – moj kho May 26 '15 at 09:49
  • Example ======== @Html.ActionLink("Go to contact page", "Index", "Growths/", new { id = item.GroupMeasure_ID }, null) Not Area Name – moj kho May 26 '15 at 09:51
  • Please tell us what the problem is... – Luke May 26 '15 at 10:02
  • If you want to put the area name in there, you specify that in the RouteValueDictionary, like `new { area = "Growth" }` – Luke May 26 '15 at 10:05

1 Answers1

0

Specify your area name in the Route Values parameter:

@Html.ActionLink("Go to contact page", "Index", "Drugs", new { area = "Growths", id = item.GroupMeasure_ID }, null))
Luke
  • 22,826
  • 31
  • 110
  • 193
  • Please Add Control Name in Action Thanks – moj kho May 26 '15 at 11:17
  • Hi I Use your code ** And does not work **And address passed to the Webbrowers  **http://localhost:38269/Teacher/Drugs ** No Action Name And No Id Parameters passed -------Thanks for the replay – moj kho May 26 '15 at 13:13
  • Main Actions **@Html.ActionLink("Go to contact page", "Index", "Drugs", new { area = "Teacher" }, new { id = 1 })) **Does not Work – moj kho May 26 '15 at 13:14