@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)
在MVC自定义模板中时常用到
eg:
第一步 : 我在model众定义EditorModel字段
public class TestEditorModel
{
[UIHint("_FullKindEditor")]
public KindEditorModel EidtorModel { get; set; }
}
第二步 :在View中使用
<div>
<h1>测试kindeditor</h1>
@Html.EditorFor(model=>model.EidtorModel)
</div>
第三步 :在模板中获取字段名
@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)