2010-02-10 41 views
1

林的动作链接和tRVD路过这里tRVD是以下内容的ActionLink的:类属性添加到可以使用routevaluedictionary

<% RouteValueDictionary tRVD = new RouteValueDictionary(ViewContext.RouteData.Values); %> 

继承人我的链接。

<%= Html.ActionLink("Previous", "Index", tRVD)%> 

如何向此href添加类属性?

我想这:

<%= Html.ActionLink("Previous", "Index", tRVD, new { @class = "left" })%> 

,但它使用的ActionLink方法的不正确超载打破了tRVD ...

+0

它打破了tRVD怎么样? – 2010-02-10 11:46:49

回答

3

You're。 你为什么不试试

<%= Html.ActionLink("Previous", "Index", tRVD, new Dictionary<string, object> { { "class", "left" } })%> 

问候。

+0

a Saver ....谢谢。 – Dani 2011-01-06 17:35:32

相关问题