示例#1
0
 public static MvcHtmlString DisplayForModel(
     this HtmlHelper html,
     string templateName,
     string htmlFieldName,
     object additionalViewData
     )
 {
     return(MvcHtmlString.Create(
                TemplateHelpers.TemplateHelper(
                    html,
                    html.ViewData.ModelMetadata,
                    htmlFieldName,
                    templateName,
                    DataBoundControlMode.ReadOnly,
                    additionalViewData
                    )
                ));
 }
示例#2
0
 public static MvcHtmlString DisplayForModel(this HtmlHelper html, string templateName)
 {
     return(MvcHtmlString.Create(TemplateHelpers.TemplateHelper(html, html.ViewData.ModelMetadata, String.Empty, templateName, DataBoundControlMode.ReadOnly, null /* additionalViewData */)));
 }
示例#3
0
 public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName, string htmlFieldName)
 {
     return(MvcHtmlString.Create(TemplateHelpers.TemplateHelper(html, html.ViewData.ModelMetadata, htmlFieldName, templateName, DataBoundControlMode.Edit, null /* additionalViewData */)));
 }
示例#4
0
 public static MvcHtmlString EditorForModel(this HtmlHelper html, string templateName, object additionalViewData)
 {
     return(MvcHtmlString.Create(TemplateHelpers.TemplateHelper(html, html.ViewData.ModelMetadata, String.Empty, templateName, DataBoundControlMode.Edit, additionalViewData)));
 }