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
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