3

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>
1
  • 3
    Just a reminder: HTML 4.01 specifies that <a> elements may only contain inline elements. A <div> is a block element, so it may not appear inside an <a>. HTML 5 however does allow it. Commented May 20, 2011 at 8:35

1 Answer 1

5

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.