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 6236097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:47:25+00:00 2026-05-24T10:47:25+00:00

I have a menu in the sidebar in a dynamic aspx page. I want

  • 0

I have a menu in the sidebar in a dynamic aspx page.
I want to highlight the current link based on the query string value.

<div id="verticalmenu">
<ul>
<li><a href="services.aspx?pageid=11">Medical Transcription</a></li>
<li><a href="services.aspx?pageid=12">Business Transcription</a></li>
 <li><a href="services.aspx?pageid=13">Legal Transcription</a></li>
  <li><a href="services.aspx?pageid=14">Insurance Transcription</a></li>
  <li><a href="services.aspx?pageid=15">Data Entry & Processing</a></li>
  <li><a href="services.aspx?pageid=16">Software Development</a></li>
  <li>  <a  href="services.aspx?pageid=25">Typesetting Services</a></li>
</ul>
</div>
  • 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-05-24T10:47:25+00:00Added an answer on May 24, 2026 at 10:47 am

    With jQuery, it could look something like this:

    $('#verticalmenu a').each(function (){
        var linktext = $(this).attr('href');
        if (linktext.search(window.location.search.substring(1)) > -1){
           $(this).addClass('current');
        }
    });
    

    Use window.location.search.substring(1) to take the last part of the url, and check it against the href attribute of your links using the search method for javascript-strings. Then add a classname for the styling purpose. I used current for example.

    It might need some tweaking, but this is the way to go. However, I would strongly recommend to do this link-recognition serverside. This is a workaround I’m not too proud of.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu bar and I want to create a div for each
I want to have 4 links in the sidebar of master page which every
I have a sidebar menu that opens and closes hidden parts of the page
I have a menu built with <ul> and <li> tags. I want to have
I have a menu div which has a dark background. Inside it, I have
I have a Menu page. If a user selects an Menu Item it opens
I have the following index.html page set-up: <html> <head> </head> <body> <div id=container> <div
I have a sidebar with collapsible menu it works fine but all the values
I have two ASP.NET Menu controls on a page. One in my header (tabs)
I have a 3-columns page where I would like to hide my right sidebar

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.