0
我有一个创建动态实体的页面。使用动态类型的MVC强类型视图
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
...
我有两个动作:
public ActionResult Create()
{
dynamic model = ...
return View(model);
}
[HttpPost]
public ActionResult Create(dynamic(1) entity)
{
...
}
好了,问题是,实体来自空从页面。如果我改变(1)中的动态为真实类型,它工作正常。
你可以发表看法这里的代码? – 2012-06-07 17:12:41