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