开发者

ASP.NET MVC ActionLink to Produce the Following HTML

How can I produce following code in ASP.NET MVC with ActionLink (not format throw css)

<a href="#"><anotherHtmlElement>Title</anotherHtmlElement></a>
example
<a href="#"><strong>Title</strong>&开发者_C百科lt;/a>


Why do it that way? How about

 <anotherHtmlElement><a href="#">Title</a></anotherHtmlElement>

Also, rather than using <strong>, you should be handling your formatting in CSS.


You can't unless You introduce new htmlHelper extension method.


Why not use "Url.Content"? Like:

 <p>
   Xopto Text <a href="@Url.Content("~/Controller/Action")">in the Controller/Action directory</a>.
 </p>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜