【发布时间】:2012-12-17 14:58:19
【问题描述】:
我是 MVC 新手,在 asp.net 中使用 MVC 2.0。
这是stylesheet1.css的内容:
.h1{color:Red;}
这是display.aspx的内容:
< head runat="server">
<## Heading ##link href="../../Content/StyleSheet1.css" rel="stylesheet" type="text/css" />
< /head>
<## body>
<## h1 class="h1">Hiiiiiiiiiiiiiiiii <## /h1>
<## /body>
这是index.aspx的内容:
##<%= Html.ActionLink("Move to display.aspx","display","home",new {id=1}, new
{@class="h1"}) %>
##<%= Html.ActionLink("Move to display.aspx", "display")%>
我的问题是 htmlattributes 参数在 html.actionlink 方法上的用途是什么,因为我发现上面的链接给出了相同的结果。
【问题讨论】:
标签: asp.net-mvc html.actionlink