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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -