Web.Sitemap... (1 Viewer)

Sergeant

Someone's gotta do it
Local time
Yesterday, 20:14
Joined
Jan 4, 2003
Messages
638
My "Organization" page has a datalist control that lists the sections in my organization (from a database).
I plan to build a hyperlink into each section title that will open a staffdirectory.aspx page that will list the employees and contact info. The link will be like "staffdirectory.aspx?sectionID=1".
I only have one staffdirectory page...how do I use a menu with the Web.Sitemap file, and also account for there being a changeable list of sections?
 

Kodo

"The Shoe"
Local time
Yesterday, 20:14
Joined
Jan 20, 2004
Messages
707
are the sections stored in the db?
 

Sergeant

Someone's gotta do it
Local time
Yesterday, 20:14
Joined
Jan 4, 2003
Messages
638
Yes, for future flexibility. For menu purposes, some pages are fixed, and others use querystring.
 

Kodo

"The Shoe"
Local time
Yesterday, 20:14
Joined
Jan 20, 2004
Messages
707
ready to learn about classes and objects?
What I would do is pull the data from the database, populate a class that deserializes to an xml document (all in memory) and then save that xml document to the file system. You would do this everytime you added a section so it would be more or less a function that happens when new sections are added. You don't want to load the xml from the db like that all the time because the changes would probably far and few between aside from an extra hit on the db,server and network traffic.

Refer to my samples for serialization info. Note that the Xmldocument object in .net has a .save() method so you can save it to a path.
 

Sergeant

Someone's gotta do it
Local time
Yesterday, 20:14
Joined
Jan 4, 2003
Messages
638
Thanks mate, I think that's just what I need.
I shall look into it tomorrow.
GoodNight
 

Users who are viewing this thread

Top Bottom