Posted on 2007-07-26
Last Modified: 2008-01-09
I'm creating a custom menu and I'm trying to retrieve the data from a sitemapdatasource but i can't get te data.

when I do this.
            Dim source As SiteMapDataSource = CType(Me.Parent.FindControl(DataSourceID), SiteMapDataSource)
            Dim list As IList = source.GetList
            For Each item As Object In list

the result is System.Web.UI.ListSourceHelper+ListSourceRow

how can I retrieve the items in the sitemapcontrol, can you please give me a working example
Question by:davyquyo
    LVL 53

    Expert Comment

    LVL 1

    Author Comment

    i'm goiing to repeat my question
    i want to create a Custom Menu
    not the default one. i want to create one on my own.
    LVL 53

    Accepted Solution

    Because that a sitemapdatasource  is based on an xml-file, you can read the xml-file into a dataset and loop the dataset.

            Dim dstSiteMap = New System.Data.DataSet

    For a complexer solution:
    Building and Consuming a Dynamic Sitemap in ASP.NET 2.0
    LVL 1

    Author Comment

    its not the sitemap i will create but it wil do i think

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now