I'm having trouble understanding when to use @Html.ActionLink
or javascript:document.getElementById('Comercial').submit()
For example:
<a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a>@Html.ActionLink("Painel Inicial", "Index_Comercial", "Home")</a></li>
</ul>
Or:
using (Html.BeginForm("Index_Comercial", "Home", FormMethod.Post, new { id = "Comercial" }))
{
}
<a><i class="fa fa-home"></i> Home <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="javascript:document.getElementById('Comercial').submit()">Painel Inicial</a></li>
</ul>
- When to use one, or other?
- What are the main differences?