我的视图如下所示:
<%@ Control Language="C#"
Inherits="System.Web.Mvc.ViewUserControl<TMS.MVC.BusinessSystemsSupport.Models.SearchDataTypeModel>" %>
<table class="classQueryResultsTable">
<!-- the header -->
<tr class="headerRow">
<td>
<%= Html.ActionLink("Effective Startdate",
"SortDetails",
"DataQryUpdate",
new
{
model = Model,
sortBy = "EffectiveStartDate",
},
new { @class = "classLinkLogDetails" })%>
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我的控制器动作:
public ActionResult SortDetails(SearchDataTypeModel model, String sortBy)
{
Run Code Online (Sandbox Code Playgroud)
model参数为null.sortBy参数已填充.我可以将模型中的String属性传递给操作,没有任何问题.我想传递整个模型.
我有什么想法我做错了吗?