[英]nopCommerce 3.2 plugin isn't working on nopCommerce 3.3 after configuration
[英]Link <a href=“…”/> is not working in nopcommerce in submenu
我是NopCommerce的新手,我想在我的商店中添加子菜單。
我已經添加了子菜單,但是當我單擊它時,輸入的鏈接不起作用,這給我一個錯誤。
我的代碼如下:
菜單查看文件
<li id="DevelopmentItem">
<a href="">Development</a>
<ul id="Developmentsubmenu" class="dropdown-ul">
**<li><a href="~/Common/NpcDevelopment">NPC Development</a></li>
<li><a href="~/Indies/NPCExtensions">NPC Extension Development</a></li>
<li><a href="#">NPC Customize</a></li>**
</ul>
</li>
<script type="text/javascript">
$('#DevelopmentItem').live('mouseenter', function () {
$('#Developmentsubmenu').addClass('active');
});
$('#DevelopmentItem').live('mouseleave', function () {
$('#Developmentsubmenu').removeClass('active');
});
</script>
CommonController.cs文件
public ActionResult NpcDevelopment()
{
return View();
}
NpcDevelopment查看文件
@{
ViewBag.Title = "NpcDevelopment";
Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}
<h2>NpcDevelopment</h2>
我找不到我的錯。 誰能幫我?
您正在使用mvc3進行開發嗎? 如果是這樣,請將<a href="~/Common/NpcDevelopment"> with this
替換<a href="~/Common/NpcDevelopment"> with this
<a href="@Url.Action("{Action}", "{Controller}")">
,例如: <a href="@Url.Action("NpcDevelopment", "Common")">
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.