asp.net mvc - Html.ActionLink() not working for passing a C# object -


i'm trying pass object through actionlink method in mvc controller.

the razor syntax:

@html.actionlink("export excel","returnexcelofviewableresponses",new { searchobject = model.searchobject}) 

what's being displayed in markup:

<a href="/educationagency/returnexcelofviewableresponses?searchobject=dto.searchobject" tabindex="29">export excel</a> 

the controller method being called fine, hence no reason post here. needs done actual values passed actionlink instead of dto.searchobject? according html.actionlink method looks have right syntax (using mvc 4).

you should able pass dto, assuming it's that, parameter actionlink:

@html.actionlink("export excel","returnexcelofviewableresponses",model.searchobject) 

any public fields added query parameter key/value pair.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -