1
I’m having trouble understanding when to use a @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 using one or the other?
- What are the main differences?