2
같은 면도기에서 작성 HTML 헬퍼 요소
:HTML을 도우미에 대한 Visual Studio를 자동 완성
@Html.LabelFor(m => m.MyProperty, new { @class="col-sm-2 control-label" })
또는
@Html.TextBoxFor(m => m.MyProperty, new { @class="form-control", placeholder="Property" })
비주얼 스튜디오 "새로운 {"에 "새로운 객체를 {"변환되고, 그러나 이것은 유효하지 않습니다. 왜 인텔리 센스가 이것을합니까? 내가 놓친 게 있니? htmlAttributes
유형 선언의 일부 종류를 가지고있다, 결국
public static MvcHtmlString TextBoxFor<TModel, TProperty>(
this HtmlHelper<TModel> htmlHelper,
Expression<Func<TModel, TProperty>> expression,
Object htmlAttributes
)
, 그리고 'dynamic
을 얻지 못한 이후 Object
, 그들은 고른 최소 공통 분모이었다
그것은 나에게도 마찬가지입니다. 나는 단지'object' 부분을 삭제하고 내 하루를 계속합니다. –