如何获取下面生成的 View 代码,将编辑器字段放置在编辑器标签右侧的同一行上?我不想弄乱生成的默认值,例如删除 div,因为我仍处于早期开发阶段,并且经常重新生成 View 。
<div class="editor-label">
<%: Html.LabelFor(model => model.Suburb) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Suburb) %>
<%: Html.ValidationMessageFor(model => model.Suburb) %>
</div>
最佳答案
您可以尝试将 .editor-label 和 .editor-field div 向左浮动,并将 .editor-label 向左清除
关于asp.net - 如何将 MVC View 标签和编辑字段放在同一行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3205520/