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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:56:02+00:00 2026-05-25T13:56:02+00:00

I have this asp:menu with a few items and want to be able to

  • 0

I have this asp:menu with a few items and want to be able to set an item as active when I’ve clicked it.

Here it goes

<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
    <Items>
        <asp:MenuItem NavigateUrl="~/pages/page_a.aspx" Text="PageA" />
        <asp:MenuItem NavigateUrl="~/pages/page_b.aspx" Text="PageB" />
        <asp:MenuItem NavigateUrl="~/pages/page_c.aspx" Text="PageC" />
    </Items>
</asp:Menu>

This renders a menu looking something like this

PageA PageB PageC

When clicking something like PageB I’d like to be able to style it somehow, like adding a css or whatever returning this

PageA PageB PageC

Any advices where I can find some info or samples?

  • 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-25T13:56:02+00:00Added an answer on May 25, 2026 at 1:56 pm

    You can apply a CSS class or styles to a menu item using the ‘selectedstyle’ properties of the asp:Menu control, using syntax like this:

          <staticselectedstyle backcolor=LightBlue
          borderstyle="Solid"
          bordercolor="Black"
          borderwidth="1"/>
    

    A more full example is described in this MSDN article.

    EDIT in response to comment:

    There is also the ‘dynamicselectedstyle’ property for dynamic menus which used the same syntax:

          <dynamicselectedstyle backcolor=LightBlue
          borderstyle="Solid"
          bordercolor="Black"
          borderwidth="1"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net Menu Item <asp:MenuItem NavigateUrl= Text=Download Value=Download/> . When this item gets
I am using ASP.NET/C# . In my menu I have this li item <li><a
<Items> <asp:MenuItem NavigateUrl=~/Default.aspx Text=Home/> <asp:MenuItem NavigateUrl=~/About.aspx Text=About/> </Items> I have this menu How can
I have an ASP Menu like this: <asp:Menu ID=NavigationMenu runat=server EnableViewState=False IncludeStyleBlock=False Orientation=Horizontal meta:resourcekey=NavigationMenuResource1>
I have an asp:Menu control that has four different menu items in it. Each
I have a menu user control with image buttons like this one: <asp:TableCell ID=tcDownload
I have an asp:Menu and it contains a top level menu item that points
I have a asp:menu object which I set up to use a SiteMapDataSource but
I have a list of asp.net menu items: <asp:Menu ID=Menu1 runat=server OnLoad=Menu1_Load> <Items> <asp:MenuItem
i have this menu schema: <nav> <ul> <li><a href=index.asp>home</a></li> <li><a href=colecao.asp>coleção</a></li> <li><a href=tecnologia.asp>downloads</a></li> <li><a

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.