473,396 Members | 1,998 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 Menu

Is there any way by which I can create a dynamic database driven Menu
using ASP.NET/C#......

Thanks
Amit Arora

Feb 17 '06 #1
6 1771
About every control can be populated from code like from the page_load.
<ar*********@gmail.com> schreef in bericht
news:11*********************@g43g2000cwa.googlegro ups.com...
Is there any way by which I can create a dynamic database driven Menu
using ASP.NET/C#......

Thanks
Amit Arora

Feb 17 '06 #2
Hi Amit,

I did create a left navigation menu in my web page using below code.

While (reader.Read())
Dim navLink As New HtmlHyperLink
navLink.Text = reader.GetString("Text");
navLink.Url = reader.GetString("URL");
AddRow(navLink)
If index < (years.Count - 1) Then
AddRow(New LiteralControl("&nbsp;"))
End If
End While
Private Sub AddRow(ByRef control As Control)
Dim row As New System.Web.UI.HtmlControls.HtmlTableRow
Dim cell As New System.Web.UI.HtmlControls.HtmlTableCell

If Not control Is Nothing Then
cell.Controls.Add(control)
End If
row.Cells.Add(cell)
tblLinks.Rows.Add(row)
End Sub

Cheers,
Kris

Feb 17 '06 #3
Thanks Mate.....
But i guess u took me wrong...
I mean the menu, kind of comes horizontally on which mouseover,
mouseout etc. events gets fired.
I guess u have understood my requirement.
Any suggesion???..

Thanks,
Amit Arora

Feb 17 '06 #4
Hi Amit,

Yes. You can do this very well. Create a custom control which outputs
HTML text, and add onMouseOver, onMouseOut client events to display or
hide the tables accordingly. Handle these events with the help of
Javascript and CSS.

Once I did similar kind of dynamic menu generation with the help of XML
and Vb.Net.

Cheers,
Kris

Feb 17 '06 #5
On this site:

http://www.hellobasic.com/dotnet/imgmap1/default.aspx

I used the *ordinary* asp:Menu (for *this* specific example you'll need
MSIE, flaw in Opera).

It shows: File, Edit and Help with menus.
<ar*********@gmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Thanks Mate.....
But i guess u took me wrong...
I mean the menu, kind of comes horizontally on which mouseover,
mouseout etc. events gets fired.
I guess u have understood my requirement.
Any suggesion???..

Thanks,
Amit Arora

Feb 17 '06 #6
DWS
Horizontal with asp.net menu control you have to create seperate menus for
each column similar to how Kris built his but going across.
"Edwin Knoppert" wrote:
On this site:

http://www.hellobasic.com/dotnet/imgmap1/default.aspx

I used the *ordinary* asp:Menu (for *this* specific example you'll need
MSIE, flaw in Opera).

It shows: File, Edit and Help with menus.
<ar*********@gmail.com> schreef in bericht
news:11**********************@g43g2000cwa.googlegr oups.com...
Thanks Mate.....
But i guess u took me wrong...
I mean the menu, kind of comes horizontally on which mouseover,
mouseout etc. events gets fired.
I guess u have understood my requirement.
Any suggesion???..

Thanks,
Amit Arora


Feb 17 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
4
by: Stromboli | last post by:
hi people, My problem is that I need to build a dynamic menu (preferably that works in all the browsers) that appears when I mouseover a certain link. The problem is that I have to declare...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: biela | last post by:
Hi I'm from Poland and I have small question :). I'm looking for sample example how to create dynamic menu. Generaly my website will see like that ------------------------------------ 2...
2
by: vikram | last post by:
I have to design a page which contains a dynamic generated menu at left side.Menu will be generated once a user log in and will remain as it is for the rest of the user session. Problem is that...
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....
3
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be...
0
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item....
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...
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
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.