在.NET mvc3 中,我用@Html.TextAreaFor设置一个值,然后我怎样指定这个Area的在CSS中的样式的“class” ,哪个文档中有,System.Web.Mvc.Html渲染这方面的内容,刚接触.NET,谢谢大家帮忙。NET .NETCSSMVC

解决方案 »

  1.   

    @Html.TextAreaFor(x => x.Phone, new { @class = "yourcss"} )new 里面是你自定义attribute的key和value
      

  2.   

    入门请看Pro Asp .net MVC3 Framework
      

  3.   

    @Html.TextAreaFor(
    这个时候智能提示就会出现了~
    你可以按↑ 按↓ 看看大概如此了
    @Html.TextAreaFor(model=>model.xxx,new{@class=""})
      

  4.   

    @Html.TextAreaFor(x => x.Phone, new { @class = "yourcss"} )这个字符串要放在TextArea的哪里