asp.net-mvc-2

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></a>

Solution

  • 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.