用反射在cshtml 生成控件和值的举例子
PublishedCreated: 2015年11月9日星期一 14:14:03 views(1342)
@foreach(var property inModel.CategoryType.GetType().GetProperties()){@Html.Hidden("Product."+ property.Name, property.GetValue(Model.CategoryType));}http://stackoverflow.com/questions/16180845/how-to-post-complex-models-to-action-using-reflection .