Override EditorForModel Template

ぃ、小莉子 提交于 2019-12-22 07:23:30

问题


You can provide alternate templates for individual types, but is it possible to override the template that wraps the label, field and validation up.

Change:

<div class="editor-label"><label for="Content">Content</label></div>
<div class="editor-field"><input class="text-box single-line" id="Content" name="Content" type="text" value="" /> </div>

To:

<div class="field">
<label for="Content">Content</label>
<input class="text-box single-line" id="Content" name="Content" type="text" value="" /> </div>

Rich


回答1:


You can write an Object.ascx template and perform your own logic.



来源:https://stackoverflow.com/questions/1630048/override-editorformodel-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!