Make sure your master page is correctly referring the menu's css and js files.
Helping you always. Don't forget to click "Mark as Answer" on the post that helped you.
♠ ASP.NET Core Tutorials → Start from the Beginning and become an Expert in 30 days time ♠
It looks like you customized the master page and used it. As for what you mean by the menu not working?
Have you tried using the developer tools to view the program problems? Press the
F12 key to open it and view all information on the current page.
If you can provide more details, If you can provide more details, I think this can find the problem faster and more accurately and solve it, mainly including:
What you want to achieve
Sample code for master page
Best regards,
Xudong Peng
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
1 Post
The menue is not working in master page
Jul 02, 2020 10:08 AM|Bhav98|LINK
Hello all,
I have a menue but it is not working in master page.
I placed same in a webform, it is working.
Help me please
below is my code
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="WebForm2.aspx.vb" Inherits="WebApplication2.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="site-wrap">
<div class="site-mobile-menu">
<div class="site-mobile-menu-header">
<div class="site-mobile-menu-close mt-3">
<span class="icon-close2 js-menu-toggle"></span>
</div>
</div>
<div class="site-mobile-menu-body"></div>
</div>
<header class="site-navbar pt-3" role="banner">
<div class="container-fluid">
<div class="row align-items-center">
<div class="col-6 col-xl-6 logo">
<a href="index.aspx"> <img src="../images/logo.png" style="width: 200px"></a>
</div>
<div class="col-6 mr-auto py-3 text-right" style="position: relative; top: 3px;">
<a href="#" class="site-menu-toggle js-menu-toggle text-black d-inline-block d-xl-none"><span class="icon-menu h3"></span></a></div>
</div>
<div class="col-12 d-none d-xl-block border-top">
<nav class="site-navigation text-center " role="navigation">
<ul class="site-menu js-clone-nav mx-auto d-none d-lg-block mb-0">
<li><a href="index.aspx">Accueil</a></li>
<li><a href="nouvelles.aspx">Nouvelles</a></li>
<li><a href="social.aspx">Social</a></li>
<li><a href="instantanes.aspx">Instantanés</a></li>
<li><a href="inhouse.aspx">In-house</a></li>
<li><a href="nouveauxvisages.aspx">Nouveaux Visages</a></li>
<li class="active"><a href="detente.aspx">Détente</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="site-cover site-cover-sm same-height overlay single-page" style="background-image: url('../images/cat_detente.jpg');">
<div class="container">
<div class="row same-height justify-content-center">
<div class="col-md-12 col-lg-10">
<div class="post-entry text-center">
<h1 class="mb-4"><a href="#">Détente</a></h1>
</div>
</div>
</div>
</div>
</div>
<section class="site-section py-lg">
<div class="container">
<div class="row blog-entries element-animate mb-3">
<div class="col-md-12 col-lg-8 main-content">
<div class="entry2 mb-4">
<a href="detente_jeu.aspx"><img src="../images/detente/jeu_preview.jpg" alt="Image" class="img-fluid rounded"></a>
<span class="post-category text-white mb-3" style="background-color: #f07e26">Détente</span>
<h2><a href="detente_jeu.aspx">Jeu juin 2020</a></h2>
<div class="post-meta align-items-center text-left clearfix">
</div>
<p>Prenons
Cette série
</p>
</div>
<div class="col-12 d-none d-xl-block border-divider"></div>
<div class="entry2 mb-4">
<a href="detente_jeuprecedent1.aspx"><img src="../images/detente/jeu_precedent.jpg" alt="Réponses au jeu précédent" class="img-fluid rounded"></a>
<span class="post-category text-white mb-3" style="background-color: #f07e26">Détente</span>
<h2><a href="detente_jeuprecedent1.aspx">Réponses au jeu précédent</a></h2>
<div class="post-meta align-items-center text-left clearfix">
</div>
<p>Rspeond.</p>
</div>
</div>
<!-- END main-content -->
<div class="col-md-12 col-lg-4 sidebar">
<div class="sidebar-box">
<h3 class="heading">À la une</h3>
<div class="post-entry-sidebar">
<ul>
<li>
<a href="nouvelles_strategie_digitale.aspx">
<img src="../images/nouvelles/myswan_p.jpg" alt="Image placeholder" class="mr-4">
<div class="text">
<h4>Stratégie digitale -<br>une évolution nécessaire</h4>
</div>
</a>
</li>
<li>
<a href="nouvelles_ssr_award.aspx">
<img src="../images/nouvelles/award1.jpg" alt="Image placeholder" class="mr-4">
<div class="text">
<h4>Un </h4>
</div>
</a>
</li>
<li>
<a href="instantanes_gallery.aspx">
<img src="../images/instantanes/instantanes_p.jpg" alt="Image placeholder" class="mr-4">
<div class="text">
<h4>Autour du </h4>
</div>
</a>
</li>
</ul>
</div>
<div class="col-12 d-none d-xl-block border-divider2"></div>
</div>
<div class="sidebar-box">
<div class="bio text-center">
<img src="../images/person_2.jpg" alt="Image Placeholder" class="img-fluid mb-5">
<div class="bio-body">
<h2>Me</h2>
<h5 style="color: #484848">Défi passé et relance à venir</h5><p class="mb-4">« Lrsité... »</p>
<p><a href="message.aspx" class="btn btn-primary btn-sm rounded px-4 py-2">Lire Message</a></p>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="site-footer">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<p>
H
</p>
</div>
</div>
</div>
</div>
</div>
</asp:Content>
Contributor
5961 Points
2468 Posts
Re: The menue is not working in master page
Jul 02, 2020 11:21 PM|KathyW|LINK
You have not told us what you mean by "it's not working".
Participant
1253 Points
936 Posts
Re: The menue is not working in master page
Jul 03, 2020 02:24 AM|yogyogi|LINK
Make sure your master page is correctly referring the menu's css and js files.
♠ ASP.NET Core Tutorials → Start from the Beginning and become an Expert in 30 days time ♠
Contributor
2110 Points
674 Posts
Re: The menue is not working in master page
Jul 03, 2020 05:38 AM|XuDong Peng|LINK
Hi Bhav98,
It looks like you customized the master page and used it. As for what you mean by the menu not working?
Have you tried using the developer tools to view the program problems? Press the F12 key to open it and view all information on the current page.
If you can provide more details, If you can provide more details, I think this can find the problem faster and more accurately and solve it, mainly including:
Best regards,
Xudong Peng