I am trying to pass an object via ActionLink to a method in the MVC controller.
Razor Syntax:
@Html.ActionLink("Export to Excel","ReturnExcelOfViewableResponses",new { SearchObject = Model.SearchObject})
What is actually displayed in the markup:
<a href="/EducationAgency/ReturnExcelOfViewableResponses?SearchObject=DTO.SearchObject" tabindex="29">Export to Excel</a>
The controller method is called just fine, so there is no reason to post here. What needs to be done so that the actual values ββare passed to actionLink instead of DTO.SearchObject ? According to the HTML.ActionLink method , it looks like I have the correct syntax (using MVC 4).
source share