1
I need to change the menu to apply a Dropdownlist, but I’m having difficulty. I’m following the footsteps of the bootstrap site, but when click does not appear the submenu, follow the code below:
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="../../Home/Index"><img src="~/Images/logo_Web.png" width="50" height="50" /></a>
</div>
<div class="navbar-collapse collapse">
@if (Session["PerfilUsuario"] != null)
{
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Chamados <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>@Html.ActionLink("Novo Chamado", "Create", "Chamado")</li>
<li>@Html.ActionLink("Acompanhar Chamados", "Index", "Chamado")</li>
@if (Session["PerfilUsuario"].ToString().Equals("1") || Session["PerfilUsuario"].ToString().Equals("3")|| Session["PerfilUsuario"].ToString().Equals("5")|| Session["PerfilUsuario"].ToString().Equals("6")){
<li>@Html.ActionLink("Chamados Encerrados", "ChamadosEncerrados", "Chamado")</li>
}
</ul>
</li>
@if (Session["PerfilUsuario"].ToString().Equals("1"))
{
<li>@Html.ActionLink("Obras", "Index", "Obra")</li>
}
@if (Session["PerfilUsuario"].ToString().Equals("1") || Session["PerfilUsuario"].ToString().Equals("6"))
{
<li>@Html.ActionLink("Setores", "Index", "Setor")</li>
}
</ul>
}
@Html.Partial("_LoginPartial")
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - Chamados BRA</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
I had the same problem, solved with jquery update, upgraded to 1.9.0 or any version above that.
– Elói Ferreira