이 충분히 간단한 같습니다5.1.2 EditorFor htmlAttributes
@ Html.EditorFor (m => m.FirstName 새로운 htmlAttributes = {{새로운 @class는 = "폼 제어"}}
을그러나, 방출 페이지
이 충분히 간단한 같습니다5.1.2 EditorFor htmlAttributes
@ Html.EditorFor (m => m.FirstName 새로운 htmlAttributes = {{새로운 @class는 = "폼 제어"}}
을그러나, 방출 페이지
@Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
이, 당신이 거기 끝에 쉼표가 나를 위해 작동하는 것 같다.이 클래스는 적용이 올바르게 paranthesis를 닫 실패하지 않습니다.
MVC의 편집기를 돕는 사람 해당 인수로 additionalViewData
개체가 필요합니다. 이것은 ASP.Net MVC 5.1에서 더 잘 처리되었지만 잠시 동안 EditorFor
을 TextBoxFor
으로 바꾸는 것이 트릭을 멋지게 처리해야합니다.