没有人知道为Kendo MVC文本框多行设置哪些属性?
@(Html.Kendo().TextBox()
.Name("txtComments")
.Value(@Model.Comments)
.HtmlAttributes(new { style = "width:100%" })
)
谢谢。
如果您想要textarea
,我建议您这样做:
@Html.TextArea("textarea", "", new { @class="k-textbox", style = "width: 100%;" })
如其demo所示。如果您要这样做,这将使您能够获得相同的Kendo样式。
如果要与模型一起使用:
@Html.TextAreaFor(x => x.Description, new { @class = "k-textbox", style = "width: 100%;", placeholder = "Notes... Descriptions..." })