我的ActionLink与routeValues:lld。
@Html.Raw(@Ajax.ActionLink(
linkText: "[replacetext]",
actionName: "StartAndCreateNewDetail",
controllerName: "PpLd",
routeValues: lld,
ajaxOptions: new AjaxOptions { UpdateTargetId = "tblProgressbarAndAction" }
).ToHtmlString().Replace("[replacetext]", "<span id='" + @btnStart + "' class='glyphicon glyphicon-play'></span>"))
lld是来自typ的对象:
public class Lld
{
public LE le { get; set; }
public List<LEDETAIL> lstLEDETAIL { get; set; }
[DataType(DataType.Date)]
public DateTime ReleaseDate { get; set; }
public long LeErbId { get; set; }
}
控制器方法:
public ActionResult StartAndCreateNewDetail(Lld lld){
le = lld.le; // is null
lstLEDETAIL lstDe = lld.lstLEDETAIL; // is null
ReleaseDate rd = lld.RealeseDate; // is not null
LeErbId leerbid = lld.LeErbId; // is not null
}
为什么lld.le和lld.lstLEDETAIL为空?