How to create a link in asp.net mvc with html tags in the header?

How can I create a link using this - http://msdn.microsoft.com/en-us/library/dd505243.aspx html.RouteLink using html tags in the header? As a result, I would see something like this:

<a class="" href="#"><div class="someclass">1</div><div class="someotherclass"></div></a>
+3
source share
1 answer

Why don't you try using the Url.Action () method . Something like that:

<a href="@Url.Action("About", "Home")" class="something"><div class="someclass">1</div><div class="someotherclass"></div></a>

Just an offer. The example is written using Razor syntax, but you can also just use it with the ASPX viewer ...

+5
source

All Articles