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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:27:29+00:00 2026-05-23T20:27:29+00:00

I’ve been trying to use ASP:Menu.SelectedValue property but it is not working so if

  • 0

I’ve been trying to use ASP:Menu.SelectedValue property but it is not working so if anyone has used this before please read on. Here is the code.

<asp:Menu ID="Menu1" runat="server" BackColor="#B5C7DE" 
            DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" 
            ForeColor="#284E98" onmenuitemclick="Menu1_MenuItemClick1" 
            StaticSubMenuIndent="10px" Visible="False">
            <DynamicHoverStyle BackColor="#284E98" ForeColor="White" />
            <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <DynamicMenuStyle BackColor="#B5C7DE" />
            <DynamicSelectedStyle BackColor="#507CD1" />
            <Items>
                <asp:MenuItem Selectable="False" Text="Analysis" Value="Analysis">
                    <asp:MenuItem Selectable="False" Text="Descriptive" Value="Descriptive">
                        <asp:MenuItem Text="Mean" Value="Mean"></asp:MenuItem>
                        <asp:MenuItem Text="Median" Value="Median"></asp:MenuItem>
                        <asp:MenuItem Text="Mode" Value="Mode"></asp:MenuItem>
                    </asp:MenuItem>
                </asp:MenuItem>
            </Items>
            <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
            <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
            <StaticSelectedStyle BackColor="#507CD1" />
</asp:Menu>

And the code behind

protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            MenuItem selectedItem = Menu1.SelectedItem;
            lblUpload.Text = Menu1.SelectedItem.Text;

            if (Menu1.SelectedItem.Text == "Mean")
            {
                lblSet.Visible = true;
                DropDownList1.Visible = true;
                btnCalculate.Visible = true;
            }
        }

I added in the Line

 lblUpload.Text = Menu1.SelectedItem.Text;

to test the output on a visible and working label but nothing is returning. Can anyone see the problem with this?
I have also tested;

lblUpload.Text = SelectedItem.Text/.value;
lblUpload.Text = Menu1.SelectedItem.Value;
lblUpload.Text = Menu1.SelectedItem.ValuePath;

None of these affect the label in anyway. Is there problems with this control in general or am I missing an obvious mistake. Appreciate any feedback thanks.

  • 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-23T20:27:30+00:00Added an answer on May 23, 2026 at 8:27 pm

    This works as soon as you make Menu1 visible and change onmenuitemclick=”Menu1_MenuItemClick1″ to onmenuitemclick=”Menu1_MenuItemClick”.

    I Menu1 needs to change visibility please provide the code that shows how you do it.

    Edited:

    Try to break down the problem into small pieces:

    1. The problem might be that you have an error trying to access the selected menu item
    2. You might have a problem displaying the selected item in lblUpload

    The best way check is to set a breakpoint at Menu1_MenuItemClick, start debugging by hitting F5 and have a look at Menu1.SelectedItem.Text there.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.