KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Can I set the width of an EditorFor control on my View? I have set a few parameters: [Required, DisplayName("Payee Name"), StringLength(50)] public string Name { get; set; } However, I can't seem to set the width of the textbox that gets rendered. <table width="300" border="0" cellpadding="3" cellspacing="0"> <tr> <td> <%=Html.LabelFor(m => m.Name)%> </td> <td> <%=Html.EditorFor(m => m.Name)%> </td> </tr> Can this be done somehow? I tried: <%=Html.EditorFor(m => m.Name, new {width=50)%> But no joy...
Tags (comma-separated)
Save Edits
Cancel