Create Navigation left menu in ASP NET | bootstrap | jQuery

Spread the love
Create Navigation left menu or sidebar of Master Page in ASP NET | bootstrap | jQuery

Hi, in this article, you will learn how to add sidebar, Navigation left toggle menu in Master Page in webforms using Html, css, Bootstrap, jQuery .

Code Behind
Step 1. add the following code in master page
<html lang="en">
<head runat="server">
<title><%: Page.Title %> - My ASP.NET Application</title>

<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="">
<link href="vendor/StyleSheet1.css" rel="stylesheet" />

<form runat="server">

<div class="d-flex" id="wrapper">
<div class="bg-light border-light" id ="sidebar-wrapper">
<div class="sidebar-heading">RashiCode</div>
<div class="list-group list-group-flush">
<a href="#" class="list-group-item list-group-item-action bg-light">Dashboard</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Blog</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Overview</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Profile</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Portfolio</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Events</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Aboutus</a>
<a href="#" class="list-group-item list-group-item-action bg-light">Contect us</a>



<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
<button type="button" id="menu-toggle" class="btn btn-primary">
<i class="fa fa-bars"></i>
<span class="sr-only">Toggle Menu</span>

<div class="container-fluid">
<h1 class="mt-4">Simple Sidebar</h1>
ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>


<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="vendor/jquery/jquery.min.js"></script>

$("#menu-toggle").click(function (e) {


<div class="container body-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
<hr />
<p>&copy; <%: DateTime.Now.Year %> - My ASP.NET Application Simple Sidebar</p>

Step 2 : add new style sheet and paste the code below
* Licensed(

#wrapper {
overflow-x: hidden;

#sidebar-wrapper {
min-height: 100vh;
margin-left: -14rem;
-webkit-transition: margin .25s ease-out;
-moz-transition: margin .25s ease-out;
-o-transition: margin .25s ease-out;
transition: margin .25s ease-out;

#sidebar-wrapper .sidebar-heading
padding:0.880rem 1.26rem;

#sidebar-wrapper .list-group

#wrapper.toggled #sidebar-wrapper{


#wrapper.toggled #sidebar-wrapper{

Video Tutorial
Source Code

Thanks for visiting us. Please don’t forget to subscribe our official YouTube Channel RashiCode

Leave a Reply

Your email address will not be published.