TextAreaFor Not Working When Using HtmlAttributes Overload
问题 For some reasons, when I set my TextAreaFor style properties specifically the width property, it is not working, what I mean is the width is not changing, and the Id is not changing as well: @Html.TextAreaFor(model => model.AdminSetting.Style, new { htmlAttributes = new { @class = "form-control", @style = "width: 100%;", @id = "HelloWorld" } }) But if I remove the word htmlAttributes and change it to this then it working fine. I really wonder why: @Html.TextAreaFor(model => model.AdminSetting