Hide editor-label for public property when calling EditorFor(…)?

前端 未结 1 379
自闭症患者
自闭症患者 2021-01-12 21:10

When calling Html.EditorFor(m => m), where m is a public class with public properties, a hidden input and a label are displaye

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 21:54

    Solved with:

    [HiddenInput(DisplayValue=false)]
    

    Otherwise HideSurroundingHtml is not set correctly.

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题