Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: aspnetmenu


Message #1 by "wwboy" <dado92@h...> on Tue, 24 Sep 2002 14:31:37
Kind all,
        does anybody could send some ex. code to load fromma DB the XML 
file which is at the basys of  http://www.aspnetmenu.com/designer.aspx?
id=8   

As DB I use SQL-server 2000. 
Tnx so many in advance and regards. 

Kylie
Message #2 by "Mike Gale" <info@d...> on Wed, 25 Sep 2002 07:43:28 +1200
Kylie wrote:
>         does anybody could send some ex. code to load fromma DB the
> XML file which is at the basys of 
> http://www.aspnetmenu.com/designer.aspx? id=8

To research this I suggest you look at
1)  www.asp.net
2) and MSDN at microsoft.com

You need to understand what you are doing otherwise you'll waste a lot
of time.

Issues to thoroughly grasp probably include:
1)  Getting data into a dataset, maybe with related tables inside the
dataset.  (Assuming you understand parameterised queries inside the
database.)
2)  Serializing a dataset to XML.
3)  Using streams, to hold the XML in memory (the model is not
immediately obvious, when you understand it you realise it is extremely
powerful)
4)  Transforming the XML (XSLT).  (.NET has some real power in this
area.)
5)  Loading the result into the menu object. (I've no idea how that
works.)

Along the way you'll almost certainly need to build test harnesses of
some sort to examine what you're doing. 

Mike Gale, Decision Engineering (NZ) Ltd.

PS.  There are a lot of ways to do this sort of thing.  (The above
reflects the approach I've found is best.)  You could also simply write
procedural code to process the dataset/datareaders into XML!


Message #3 by "T Roach" <troach242@e...> on Wed, 25 Sep 2002 15:14:54
I am doing the same thing.  I also want to read my menu data from the 
database instead and then convert it to XML to be transformed in the 
navigator class.

I am pretty new the .net so this process is tough.  I know there are 
easier ways to accomplish the task.  I have tried to manually loop thru 
my Dataset and create the xml string, but is there a better way to work 
with the xml and datasets?  The msdn docs keep taking me in circles.

Do you have any sample code you can share about how you did your menus?

Thanks,
Thom
Message #4 by <kd@k...> on Wed, 25 Sep 2002 09:42:32 -0500
Here's a link to some xml .net menus (source code)
http://www.tomorrowslearning.com/content.aspx?content=search&searchText=menu

also...the book "XML for ASP.Net Developers" by Dan Wahlin
gives an example...it's not cross browser ...and doesn't use a db....but
maybe it'll help you....

Karen

> Do you have any sample code you can share about how you did your menus?
>
> Thanks,
> Thom
>

Message #5 by "Mike Gale" <info@d...> on Thu, 26 Sep 2002 08:03:15 +1200
T Roach wrote:
> I am pretty new the .net so this process is tough.  I know there are
> easier ways to accomplish the task.  I have tried to manually loop
> thru my Dataset and create the xml string, but is there a better way
> to work with the xml and datasets?  The msdn docs keep taking me in
> circles.

Sometimes the manual way is best (at least when you start).  This helps
the (rather hard) learning process.

Look up the WriteXML method of a dataset to convert it to XML.

Mike Gale, Decision Engineering (NZ) Ltd.



  Return to Index