Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:08:22+00:00 2026-06-09T19:08:22+00:00

How to set the Active menu item color when i click the sub submenu

  • 0

How to set the Active menu item color when i click the sub submenu items or main item in asp.net master page.

My code is (master page source)

<ul class="art-menu">
      <li><a href="#" class="{ActiveItem}"><span class="l"></span><span class="r"></span><span
                            class="t">Submission</span> </a>
                            <ul>
                                <li><a href="../QuoteStatus.aspx">Search Submission</a></li>
                                <li><a href="../NewQuote.aspx">New Submission</a></li>
                            </ul>
                        </li>
                        <li><a href="#"><span class="l"></span><span class="r"></span><span class="t">Requests</span></a>
                            <ul>
                                <li><a href="../Requests/IssueCertificates.aspx">Issue Certificates</a></li>
                                <li><a href="../Requests/QuoteCancellation.aspx">Cancellation</a></li>
                                <li><a href="../Requests/LossRuns.aspx">Loss Runs</a></li>
                                <li><a href="../Requests/Endorsements.aspx">Endorsements</a></li>
                            </ul>
                        </li>
                        <li><a href="#"><span class="l"></span><span class="r"></span><span class="t">Reports</span></a>
                        </li>
                        <li><a href="#"><span class="l"></span><span class="r"></span><span class="t">Configuration</span></a>
                            <ul>
                                <li><a href="../Administration/UserInformation.aspx">User Information</a></li>
                                <li><a href="../SignUp.aspx">New User</a></li>
                                <li><a href="../Administration/AdminSettings.aspx">Admin Settings</a></li>
                            </ul>
                        </li>
</ul>

how to write the code , please give me suggestion about that…

thank u
hemanth

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:08:23+00:00Added an answer on June 9, 2026 at 7:08 pm

    Here is what I do. There could be a better way. You can try it.

    NOTE: your link should have runat="server" so you can access them from code-behind

    protected void Page_Load(object sender, EventArgs e)
    {            
        string curlink = Request.RawUrl;
    
        if (curlink.Contains("/administration/school")) 
        {
            schoolinfolink.Attributes["class"] = "selected";
        }
        else if (curlink.Contains("/administration/result"))
        {
            resultlink.Attributes["class"] = "selected";
        }
        else if (curlink.Contains("/administration/staff"))
        {
           staffslink.Attributes["class"] = "selected";
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to set the menu to active when click on it. This is
For example, I have node/31. And I want drupal to set menu active item
May i know how set active menu which page something like page.php?name=about $a =
So I've been using : treeView.setCurrentIndex( index ) to set the active item in
I use the following code to highlight a menu item if the post is
Here is my code: HTML <div class=menu> <ul> <li class=active><a href=index.html>HOME</a></li> <li class=active><a href=#>COMPANY</a></li>
I've made a one page layout website, where the menu doesn't show the active/current
On page load, the javascript would make the menu button active. $('#menu ul li.menuItem:eq(1)').addClass('act').siblings().addClass('inact');
In my master page I have a menu that uses jquery ui accordion. What
I have this asp:menu with a few items and want to be able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.