CodeFirst在Model中设置字段:
[DataType(DataType.MultilineText)]
[StringLength(300, ErrorMessage = "录入的字符数超过了300")]
再在前端页面的世style中设置高度宽度
@Html.EditorFor(model => model.Result, new { htmlAttributes = new { @style = "width:330px;height:100px;" } })
CodeFirst在Model中设置字段:
[DataType(DataType.MultilineText)]
[StringLength(300, ErrorMessage = "录入的字符数超过了300")]
再在前端页面的世style中设置高度宽度
@Html.EditorFor(model => model.Result, new { htmlAttributes = new { @style = "width:330px;height:100px;" } })
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。