开发者

Add span tage to ActionLink title

I need to add a span tag to the title of an actionlink to output the following html

<li><a href="#" id="topmenu1" accesskey="1" title=""><span>Homepage</span></a></li>

I currently have

<li><%= Html.ActionLink("Homepage", "Index", "Home", null, new { @id= "topmenu1" , @accesskey = "1", @title = "" } ) %></li>

which gives me

<li><a accesskey="1" href="/"开发者_JAVA百科 id="topmenu1" title="">Homepage</a></li>

without the span tag around Homepage

I cannot use

<span>Homepage</span> 

as the title variable of the actionlink, that doesn't work.


ASP.NET MVC: how to include <span> in link from Html.ActionLink?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜