Basically, I have a table with multiple editors like this:
<table>
<tr>
<td>@Html.EditorFor(x => x.Random1)</td>
<td>@Html.EditorFor(x => x.Random2)</td>
</tr>
<tr>
<td colspan="2">@Html.EditorFor(x=> x.Random3)</td>
</tr>
</table>
Now, my problem is, as you probably already figured out from the colspan="2", is that I want my third textbox to stretch all the way thorugh the two columns. In normal HTML is would naturally just add a width attribute. Is there a DataAnnotation like DataType.MultilineText
that can change the width of the editors? Any other ideas?
UPDATE: If I change it to a TextBoxFor instead of EditorFor, I can actually add @Html.TextBoxFor(x => x.Random, new { style = "width: 500px;" })
.
Only problem is, I have another textbox (lets say random4) and it somehow overrides my DataAnnotation MultilineText and makes it a plain 500px textbox. Guess ill have to digg into the CSS :(