Creating web pages menu options from XML file


Author
Message
Doron Farber
Doron Farber
StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Hi Trent,



I have the below sql which stores the menu options names. So this way I can populate into the web pages the options names etc... If you look at this web site: http://www.Intelius.com you will see People Search as the main option and then when you click that you will see all tabs. The name of the tabs are coming from the dbo.SearchCategories.SearchCategory and for the main Search option it is coming from the dbo.SearchOptions.SearchOption. It is generated as an XML file. Based on that XML the menu options and tabs are created on the fly. It is like a small Content Management. All Contents Management forms are created as smart clients app.



1)

How would you link that from the XML file into the Index.ASPX? I am trying to find the most productive way for this process.

2)

Do you handle your web site this way?





SELECT

dbo.ServiceOptions.ServiceOption,

dbo.ServiceOptions.DisplayOptionOrder,

dbo.SearchOptions.SearchOption ,

dbo.SearchOptions.DisplayOptionOrder,

dbo.SearchCategories.SearchCategory,

dbo.SearchCategories.DisplayOptionOrder,

dbo.SearchCategories.SearchCategories_PK,

dbo.SearchCategories.Comment,

dbo.SearchCategories.Tip

FROM

dbo.ServiceOptions

INNER JOIN dbo.SearchOptions

ON dbo.ServiceOptions.ServiceOptions_PK=dbo.SearchOptions.ServiceOptions_FK

INNER JOIN dbo.SearchCategories

ON dbo.SearchOptions.SearchOptions_PK = dbo.SearchCategories.SearchOptions_FK

WHERE dbo.ServiceOptions.DisableOption = 0 AND dbo.SearchOptions.DisableOption = 0 AND dbo.SearchCategories.DisableOption = 0

ORDER BY dbo.ServiceOptions.DisplayOptionOrder,dbo.SearchOptions.DisplayOptionOrder,dbo.SearchCategories.DisplayOptionOrder

FOR XML AUTO , ROOT('Menu_Options')





Thanks,



Doron
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, the query is somewhat irrelevant as the issue here is functionality and getting the menus populated with the desired data. So retrieving this from the server is really dependent upon your data structures, etc. However, if you are asking how to get the value from the server and into the page, then there are a number of ways to handle this. You can create an ASPX page that you add into you page as the menu that pulls from the database and builds the menu. This could work kind of like a download page where you change the content type and return a file, but in this case, it wouldn't really need to do that (content type change) but just retrieve the data and pull it into a parent page.
Doron Farber
Doron Farber
StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)StrataFrame User (154 reputation)
Group: Forum Members
Posts: 92, Visits: 612
Hi Trent,



Thanks for your reply.



That query generates XML and the web page gets all labels for the menu and sub menu options from the XML It is a one time thing when the XML is generated.



I was looking to see if there is a technique somewhere to populate the aspx on the fly. Otherwise there is some manual work to do to populate each control for each page etc...



Thanks,



Doron

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search