当前位置:Gxlcms > html代码 > 为html.EditorFor添加样式_html/css_WEB-ITnose

为html.EditorFor添加样式_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:4人阅读

有网友问及,怎样为html.EditorFor添加样式。

解决方法,可以参考下面语法:

先new一个htmlAttributes。

@model Book@using Insus.NET.Models;@{    Layout = null;}        Index        
ISBN: @Html.EditorFor(x => x.ISBN, new { htmlAttributes = new { @class = "EditClassFormat" } })


看看效果:

人气教程排行