请问下在ASP.NET MVC4中@Ajax.Actionlink辅助方法怎样添加样式
3 回答

红糖糍粑
TA贡献1815条经验 获得超6个赞
@Ajax.Actionlink("linktext","actionname","controllername",new AjaxOptions{....},new{style="color:red;font-size:14px;",@class="classname"})
您可以在编写代码的时候用 ctrl + shift + 空格 来显示参数信息,激活参数提示,提示中的 object htmlattributes 就是设置内置 html属性 的参数 (在Ajax.Actionlink 中在最后,是可选参数)当 class 属性时,因class是系统保留字,前需加@转义如上最后参数。

PIPIONE
TA贡献1829条经验 获得超9个赞
Html.ActionLink("action","controller",null,new{style="color:red",@class="nb"})
- 3 回答
- 0 关注
- 510 浏览
添加回答
举报
0/150
提交
取消