Asp.net mvc 4 如何在actionlink中实现引导

Asp.net mvc 4 如何在actionlink中实现引导,asp.net-mvc-4,twitter-bootstrap,razor,Asp.net Mvc 4,Twitter Bootstrap,Razor,我希望在以下actionlink中实现引导: @Html.ActionLink("Create New", "DepartmentView", "Department", null, new { @style="text-transform:capitalize;" }) LinkText也可以是”(空格字符),例如,如果您只想显示一个字形图标 在这种情况下不允许使用null和empty(“”)什么是“在actionlink中实现引导”?这个代码是做什么的?你希望它能做什么?@Code

我希望在以下actionlink中实现引导:

@Html.ActionLink("Create New", "DepartmentView", "Department", null, 
 new { @style="text-transform:capitalize;" })  

LinkText
也可以是
(空格字符),例如,如果您只想显示一个字形图标


在这种情况下不允许使用
null
empty
”)什么是“在actionlink中实现引导”?这个代码是做什么的?你希望它能做什么?@CodeCaster我想用图标和颜色更改“新建”链接的css。你的意思是你想将css类应用于操作链接吗?是的,很抱歉我的英语@CodeCaster我不能使用#Html.Bootstrap。然后查看示例。将
@class
属性添加到
htmlAttributes
参数。因此,将
new{@style=…
更改为
new{@class=“yourClass”,style=…
。在这种情况下,路由?当然可以,
null
是完全有效的。
@Html.ActionLink("LinkText", "FooAction", "FooController", null, new { @class = "btn btn-info" })