Razor 中的选项卡 只有一个选项卡处于活动状态



我的剃刀中有以下选项卡:

<div class="page-tabs">
<ul class="nav nav-tabs">
    @if (!Model.OriginalWork.IsNew)
    {
        <li class='@(ViewBag.IsAmendment == "0" ? "active" : "")'>
        <a href='@Url.Action("ReviewDetails", "SongsManagement", new { isAmendment = 0 }))' title="Original">Original</a>
    </li>
        <li class='@(ViewBag.IsAmendment == "1" ? "active" : "")'>
            <a href='@Url.Action("ReviewDetails", "SongsManagement", new { isAmendment = 1 })' title="Amendment">Active Amendment</a>
    </li>
    }
</ul>

当我单击它时,只有第二个选项卡显示为活动状态。当我点击原件时,它不会改变吗?

在第一个选项卡中有一个额外的括号

<div class="page-tabs">
<ul class="nav nav-tabs">
@if (!Model.OriginalWork.IsNew)
{
    <li class='@(ViewBag.IsAmendment == "0" ? "active" : "")'>
    <a href='@Url.Action("ReviewDetails", "SongsManagement", new { isAmendment = 0 
  })' title="Original">Original</a>
</li>
    <li class='@(ViewBag.IsAmendment == "1" ? "active" : "")'>
        <a href='@Url.Action("ReviewDetails", "SongsManagement", new { isAmendment = 1 })' title="Amendment">Active Amendment</a>
</li>
}
 </ul>

相关内容

  • 没有找到相关文章

最新更新