Click here to Skip to main content
15,614,665 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Payroll is Main Menu. and New Pay and Payment records of Sub menus.

New Pay
Payment Records

When i am Click Payroll. not show the submenu's

How can i get the Payroll of the submenus.

What I have tried:

<li class="nav-item">
    <a class="nav-link" data-toggle="collapse" href="#Payroll" aria-expanded="false" aria-controls="ui-basic">
        <i class="fas fa-pound-sign fa-lg text-primary" style="margin-right: 0.7em"></i>
        <i class="menu-arrow text-primary"></i>
    <div class="collapse" id="Payroll">
        <ul class="nav flex-column sub-menu">
            <li class="nav-item"><a class="nav-link" asp-controller="Pay" asp-action="Create"> New Pay</a></li>
            <li class="nav-item"><a class="nav-link" asp-controller="Pay" asp-action="Index"> Payment Records</a></li>

I am using these versions of files. not show any errors
<script src="" asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js" asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
Updated 23-Nov-22 0:03am
Richard Deeming 23-Nov-22 4:01am    
Which version of Bootstrap are you using? Have you included all of the required Javascript files? Are there any errors in the browser developer console?
2011999 23-Nov-22 4:46am    
I am used these version of files used. but not show any errors

Richard Deeming 23-Nov-22 4:58am    
That version is so old, the docs no longer include it. Looking at the v3.4 docs[^], there doesn't seem to be anything wrong with your markup.

1 solution

<li class="nav-item">
                       <a class="nav-link" data-bs-toggle="collapse" href="#Employee" aria-expanded="false" aria-controls="ui-basic">
                           class="fas fa-users fa-lg text-primary" style="margin-right: 0.7em">
                           ^__i class="menu-arrow text-primary">
                       <div class="collapse" id="Employee">
                           <ul class="nav flex-column sub-menu">
                               <li class="nav-item"><a class="nav-link" asp-controller="Employee" asp-action="Create"> New Employee</a></li>
                               <li class="nav-item"><a class="nav-link" asp-controller="Employee" asp-action="Index"> All Employees</a></li>
Share this answer
Richard Deeming 23-Nov-22 6:23am    
That's the markup for Bootstrap 5, which is not the version you said you were using.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900