c# - How to link a cshtml page using href in mvc4 -
i want link menu.cshtml page using anchor-tag href whenever click on menu link in navbar should direct me menu.cshtml. have tried few times using code not able it. here code using:
<a class="page-scroll" href="~/views/home/menu.cshtml">menus</a>
you try use actionlink html helper , let way framework produce correct link.
@html.actionlink("menus","menu","home", null, new { @class = "page-scroll" })
Comments
Post a Comment