ASP.NET MVC how to insert other html element inside @HTML.ActionLink -
normally, write this:
<li>@html.actionlink("dashboard", "index", "account")</li>
to generate this:
<a href="/account">dashboard</a>
what want know whether possible generate following html
<a href="#"><i class="fa fa-dashboard"></i> dashboard</a>
without having create own custom tagbuilder class.
thanks help.
you can use urlhelper.action generate url:
<a href="@url.action("index", "account")"> <i class="fa fa-dashboard"></i> dashboard </a>
Comments
Post a Comment