473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Controlling menu controls

Hi all,

I'm having a perplexing problem with my menu control using asp.net. Basically, I want a menu control that behaves similar to a Windows menu. For example:

File
- New
- Open
- Save
- Exit

In this instance under Windows, when one clicks on "File", the menu options (submenu) popup and the user can select on New to Exit, but the user cannot choose "File" because it does nothing more than serve as a tool to open the submenu.

I have a asp.net menu control that is similar. On my menu control, however, the "File" part is clickable (and defaults to the current page). I don't want it to be clickable as it is confusing to the user. The text highlights as clickable and when the click on it, in their eyes, nothing happens but a page reload. I simply want that if the user hovers over "File", then the submenu pops up and only the submenu items are clickable.

Here's some sample code:
Expand|Select|Wrap|Line Numbers
  1. <asp:Menu ID="Menu1" runat="server" Font-Names="Arial" Font-Size="10pt" Orientation="Horizontal" Font-Bold="True" StaticDisplayLevels="1" BorderStyle="None">
  2.     <Items>
  3.         <asp:MenuItem Text="File" Value="Trainings">
  4.             <asp:MenuItem Text="New" Value="New" NavigateUrl="NewStuff.aspx"></asp:MenuItem>
  5.             <asp:MenuItem Text="Open" Value="Open" NavigateUrl="OpenStuff.aspx"></asp:MenuItem>
  6.             <asp:MenuItem Text="Save" Value="Save" NavigateUrl="SaveStuff.aspx"></asp:MenuItem>
  7.             <asp:MenuItem Text="Exit" Value="Exit" NavigateUrl="ExitStuff.aspx"></asp:MenuItem>
  8.         </asp:MenuItem>
  9.     </Items>
  10. </asp:Menu>
  11.  
I hope I'm making sense here. Any advice is greatly appreciated.

Robert
Oct 28 '08 #1
3 1596
Curtis Rutland
3,256 Expert 2GB
I don't think you will be able to make it "unclickable" but you might be able to edit the CSS to make the cursor appear normal and the background/foreground stay the same.
Oct 28 '08 #2
Yup. Style sheets did it. You're right in that it's still clickable (a hyperlink), but it's hidden from the user that it's a hyperlink because the link doesn't highlight or anything that draws attention to it.

Thanks for the help!

Robert
Oct 28 '08 #3
Curtis Rutland
3,256 Expert 2GB
No prob, Rob.

Hey, that rhymed ;D
Oct 28 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Martien van Wanrooij | last post by:
I have been using in a lot of websites a script that creates a menu bar but avoids that the button to the current page can be clicked. I am rather satisfied with it (although suggestions for better...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
4
by: jesse.hartwick | last post by:
Hey group! I have a toolbar with a "DEVELOPER" menu. I have it so that it when the menu title is clicked, a pop-up form will appear if the user has not yet verified that he or she has developer...
4
by: paula | last post by:
I've got a problem with asp.net i am trying to make a menu control. and have searched the web for serveral controls but they don't work correctly. I am pretty new to asp.net building. What am i...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
1
by: stinehelferw | last post by:
I need a right-click menu on a form list control with combobox controls. I used View->Toolbars->Customize to create a toolbar. I added ComboBox through commands tab. I set properties to Popup...
17
by: GS | last post by:
the main menu in the application seemed to disappeared all together until I click on an control and select mainmenu1 in designer. then the mainmenu1 displays where it should be but running it or...
13
by: frk.won | last post by:
I am interested in learning how to use the VS 2005 code snippets. However, I wish to know what are the best ways to source control the code snippets? Are there any source safe/subversion...
2
by: fjohnson | last post by:
Hello, I have a CSS Horizontal dropdown menu and the drop down menu is pushed to the right instead of directly underneath the heading. I am completely new to CSS and I do not yet know exactly what...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.