Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想name在调用时使用 CSS 类显示模型的属性Html.ValueFor(x => x.Name)。
name
Html.ValueFor(x => x.Name)
如何使用@Class或其他方式完成此操作?
@Class
<span class="YOUR CLASS NAME"> if(Model!=null){ @Model.Name } </span>