By default, in ASP.NET MVC, when the system generates views (scaffolding), we have a label on one line and a text box on the next line. I would like to have a label and a text box on the same line and have a text box all over the width (100%). I try to achieve this without success.
I found several similar posts, but did not allow me to have a text box over the entire width!
Here is what I want:
So, by default I have:
<div class="editor-label"> @Html.LabelFor(model => model.Descr) </div> <div class="editor-field"> @Html.EditorFor(model => model.Descr) </div> <div class="editor-label"> @Html.LabelFor(model => model.Year) </div> <div class="editor-field"> @Html.EditorFor(model => model.Year) </div>
Any idea?
source share