473,396 Members | 2,014 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,396 software developers and data experts.

Dynamic database driven menu style ..

I have one database driven menu style .But My problem is when i hover on one my static menu it show its dynamic menu .But the dynamic menu is cover or overlap to my other statics menu .

My Master.aspx
Expand|Select|Wrap|Line Numbers
  1. <div class="MenuBar"> 
  2.   <asp:Menu ID="menuBar" runat="server" CssClass="menu1" Orientation="horizontal" Width="100%" StaticDisplayLevels="1" StaticSubMenuIndent="5"  > 
  3.     <StaticMenuStyle  CssClass ="menu1" /> 
  4.     <StaticMenuItemStyle CssClass = "menu1" /> 
  5.     <StaticHoverStyle CssClass = "hoverstyle" /> 
  6.     <DynamicMenuStyle CssClass = "submenu" /> 
  7.     <DynamicMenuItemStyle CssClass ="submenu" /> 
  8.     <DynamicHoverStyle CssClass ="hoverstyle" />   
  9.   </asp:Menu> 
  10. </div>   
Here My Master.aspx.cs
Expand|Select|Wrap|Line Numbers
  1. protected void GetMenuData()
  2.         {
  3.             DataTable dt = objuserinfo.GetMenuSelectByLoginID(Session["LoginID"].ToString());
  4.             DataView view = new DataView(dt);
  5.             view.RowFilter = "ParentFormID = 0 ";
  6.             foreach (DataRowView row in view)
  7.             {
  8.                 MenuItem menuItem = new MenuItem(row["FormName"].ToString(),
  9.                 row["FormID"].ToString());
  10.                 menuItem.NavigateUrl = row["FormLocation"].ToString();
  11.                 menuBar.Items.Add(menuItem);
  12.                 AddChildItems(dt, menuItem);
  13.             }
  14.         }
  15.         private void AddChildItems(DataTable table, MenuItem menuItem)
  16.         {
  17.             DataView viewItem = new DataView(table);
  18.             viewItem.RowFilter = "ParentFormID=" + menuItem.Value;
  19.             foreach (DataRowView childView in viewItem)
  20.             {
  21.                 MenuItem childItem = new MenuItem(childView["FormName"].ToString(),
  22.                 childView["FormID"].ToString());
  23.                 childItem.NavigateUrl = childView["FormLocation"].ToString();
  24.                 menuItem.ChildItems.Add(childItem);
  25.                 AddChildItems(table, childItem);
  26.             }
Nov 14 '14 #1
0 1192

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

Similar topics

2
by: Brent Burkart | last post by:
Can anyone recommend an inexpensive simple database driven menu? All suggestions are welcome. Thanks, Brent
1
by: Winshent | last post by:
I am trying to write a data driven menu. I am still a beginner so am asking for advice. My current method is to load all of the result into a html style string using the following code: ...
3
by: scaredemz | last post by:
hi, so i'm creating a dynamic drop-down menu. the menu and the text show up fine in IE but only the drop-down shows in Firefox without the menu text. Below is the fxn code. help pls. function...
2
by: NotGiven | last post by:
I am new to patterns and want to learn how to implement the PAGE CONTROLLER model for a web site that has log-in and where the pages are dynamic database driven pages. I will have many questions...
19
by: mart2006 | last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu....
1
by: vincemoon | last post by:
Sites such as download.com, dealtime.com, shopping.com, and tucows.com, feature impressive sortable lists of products. What software that imports CSV can be used to generate database-driven...
0
by: Oded Dror | last post by:
Hi there, I'm using ASP.NET 2.0 with VWD 2005 I created a master page with web sitemap And attached Dynamic Menu Now when I set all dynamic menu properties to BackColor = Transparent...
3
by: jaddi1 | last post by:
Hi, I am trying to make a multi-level drop-down menu similar to what is seen here: http://www.cssplay.co.uk/menus/simple_vertical.html. My problem is that some of the menu will be populated from...
10
by: mart2006 | last post by:
Hi, I'm fairly new to PHP and I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters...
25
by: pereges | last post by:
Hello, I'm trying to build a database driven website for a library management system. The database is stored on a remote server which all of my team mates can access. I've installed MySQL, PHP and...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.