简体   繁体   中英

How to create link in asp.net mvc with html tags in title?

How can i create link using this - http://msdn.microsoft.com/en-us/library/dd505243.aspx html.RouteLink using html tags in title? In result i would see something like this :

<a class="" href="#"><div class="someclass">1</div><div class="someotherclass"></div></a>

Why not you try to use Url.Action() method.. Something like this :

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

Only suggestion. Example is written using Razor syntax, but you can also simple use it with ASPX view engine...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM