How to add a border to the selected Menu Item in ASP.net

Course Queries Syllabus Queries 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago


In my .aspx file there is 5 MenuItems and 5 views respectively. What I want I am explaining below: On page load view1 will be enabled and there will be a border-bottom on MenuItem1. If I click MenuItem2 then View2 will be displayed and there will be a border-bottom on MenuItem2. Same things will happen to other menuitems and views also.

Here is my .aspx file:

 class="courseoptions">

             ID="Menu1" Orientation="Horizontal" StaticMenuItemStyle-HorizontalPadding="30px"  runat="server" OnMenuItemClick="Menu1_MenuItemClick" CssClass="menucolor" ForeColor="Black">
                 ForeColor="#15904D" BorderStyle="Outset" BorderWidth="2px" BorderColor="#11A15D" />
               
                    Text="OVERVIEW" Value="0" Selected="true" >
                    Text="SYLLABUS" Value="1">
                    Text="CERTIFICATE" Value="2">
                    Text="DISCUSSION" Value="3">
                    Text="NOTES" Value="4">
               
                 HorizontalPadding="30px" />
            

class="coursedetails"> ID="MultiView1" runat="server" ActiveViewIndex ="0"> ID="View1" runat="server"> class="view1">

Welcome to the Complete front end developer Bootcamp. This is one of the most comprehensive bootcamp available online. so, if you are new to web development, thats great news because starting from the scratch is always easy.

This course gives you a unique experience and focus only on front end web development. First we will get professional and free web development tools, then we will start with HTML. Once we cover this ground, we will take down our very first challenge. Further we will learn HTML5 and start our first project. /> Moving further we will take CSS and CSS3. After that we will learn Bootstrap and optimize our sites for mobile view. After that we will learn JavaScript and jQuery and will do some projects in that.

Structure of this is designed after research and you will never feel bore in this course. After completion of the course, you will be able to design a web page in the exact same design that is on your mind or you might have seen on some theme website.

Creating a web template of your own or edit one, you will be a full skill ninja to do the job.

ID="View2" runat="server">

Here is the syllabus

ID="View3" runat="server">

Certificate

ID="View4" runat="server">

discussion

ID="View5" runat="server">

Notes

profilepic.png
manpreet 2 years ago

With css you can get the anchor (text), but getting the li that wraps it will be difficult (or impossible?).

li[role="menuitem"] a.selected { border-bottom: 2px solid blue; }

If you can use jquery, this will work:

$("a.selected").closest("li").css("border-bottom", "2px solid blue");

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Course Queries Links