@Html.ActionLink has many overloads (at least 17), and so sometimes it becomes confusing if the operation is not so straight-foward.
For example, if you want to execute an Action of different controller, you must take care to use it like following:
Its important to pass the last parameter (which is, "hostname"),
eventhough if you pass it as "null". Doing this will take up proper overload and will call the action from different controller.
For example, if you want to execute an Action of different controller, you must take care to use it like following:
@Html.ActionLink("Link Text", "MyAction", "MyController", new {id = item.ID}, null)
Its important to pass the last parameter (which is, "hostname"),
eventhough if you pass it as "null". Doing this will take up proper overload and will call the action from different controller.
Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
ReplyDelete