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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -