Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu/SubMenu System from DataSet

Status
Not open for further replies.

chrigil

Programmer
Sep 23, 2003
178
GB
I have a DataSet with all my MainMenuItems and SubMenuItems for creating my navigation system.

I previously had this done in ASP but have decided to convert it to ASP.Net. Unfortunately I cannot use a componant or third party DLL so I need a way of doing it manually.
In ASP I used to loop through the MainMenuItems and Response.Write them all at the top of the page. I would then exit that loop and loop through all the SubMenuItems putting all the SubMenuItems with the same ID into a DIV tag.
At the end of this loop I would be left with, for example, 5 MainMenuItems and then below that, 5 DIV's each with the SubMenuItems relative to that MainMenuItem.
Easy, if a little intensive due to all the looping. This was used to Show/Hide the DIV's on MouseOver()/MouseOut().

Since trying to do the same in .Net though I am a little stumped as to how to go about it. Mainly due to the fact that in .Net the Presentation Layer is separated from the Logic by default. I realise that it doesn't have to be this strict but what is the 'Correct' way of doing it.

Initially I used Repeaters to instantly fill the menu system on Page_Load but this doesn't allow me to create the Rollovers due to the fact that all the SubMenuItems must be loaded when the page first loads.
The only other way is to reload the page and perform a filter with a DataView but agin this doesn't allow for a ClientSide change of SubMenuItems.

Any Ideas?



Thanks in advance,

Chris
 
Didn't you get anywhere with the XPath method offered in thread855-996611?

If not you could try using the repeater control with hidden div tags (like the one at
----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I managed to do exactly what I wanted using XPath. Unfortunately I then found out that ClientSide XPath using XMLDom is Windows only.

Is it possible to do the same thing on the serverside and then still have dynamic menus as described above with no page reload?



Thanks in advance,

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top