Mark Tabor

Mark Tabor

  • 570
  • 1.9k
  • 431.5k

I want to generate an I tag inside the a tag of actionlink m

Dec 1 2016 1:58 AM
I have a template which i have downloaded from the internet and it has the tag as below
case 1: <li><a href="index2.html"><i class="fa fa-circle-o"></i> Dashboard v2</a></li>
Now I want to convert this simple html to html helper method in mvc like for link menu i have
<li> @Html.ActionLink("Register", "Register1", "Home")<i class="fa fa-circle-o"></i></li>
 
but when i inspact the element of above  case one it generates
Case 2:<li><a href="index2.html"><i class="fa fa-circle-o"></i> Dashboard v2</a></li>
but my case two is not generating the i tag inside the a tag why it is so , so it is not getting the write css
my edited code case 2 generates the below html
<li> <a href="/Home/Register1">Register</a><i class="fa fa-circle-o"></i></li>
how can i generate the html{case 1} using html.actionlink  

Answers (2)