1
Problem: I’m not being able to create a dropdown menu with submenus. Ex: When clicking the profile on the left will open a drop menu the idea would be when clicking the settings open new options.
What do I expect? When the user clicks on the settings option, open new options for the same.
HTML code:
<ul class=" navbar-nav navbar-right">
<li class="dropdown navbar-user">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
<img src="@User.Identity.GetClaim("FotoPerfilUrl")" alt="" />
<span class="d-none d-md-inline">@User.Identity.GetClaim("Nome")</span> <b class="caret"></b>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item position-btn-exit" tabindex="-1" href="#">Configurações</a>
<a tabindex="-1" href="#">More options</a>
<ul class="dropdown-menu">
<li class="dropdown navbar-user"><a class="dropdown navbar-user">1</a></li>
<li class="dropdown navbar-user"><a class="dropdown-item">1</a></li>
<li class="dropdown navbar-user"><a class="dropdown-item">1</a></li>
</ul>
<form action="@Url.Action("Logout", "Account")" id="signoutForm" method="post" novalidate="novalidate">
@Html.AntiForgeryToken()
<a href="javascript:document.getElementById('signoutForm').submit()" class="dropdown-item position-btn-exit">Sair</a>
</form>
</div>
</li>
</ul>
Picture of how it turned out:
Picture of how I’d like it to look: