ComponentOne SiteMap for ASP.NET Web Forms
C1SiteMapDataSource Features / Create New SiteMap
In This Topic
    Create New SiteMap
    In This Topic

    Complete the following steps to create a new SiteMap using C1SiteMapDataSource control. Bind the SiteMap control to the C1SiteMapDataSource control, to view the output.

    This topic assumes that you have four Web Forms added to your project, each representing a web page you want to link to the site map.

    In the Designer

    1. Select the SiteMap control and click the smart tag   to open the C1SiteMapDataSource Tasks Menu.
    2. Click Edit Nodes. This opens the C1SiteMap Designer Form.
    3. Click the Add Child Item button three times.
    4. Click C1SiteMapNode2 and click the Move Item Right button.
    5. Select C1SiteMapNode1. On the right hand side, set the Url property to Web Form2.aspx. Similarly, set the Url property for C1SiteMapNode2 and C1SiteMapNode3 to Web Form3.aspx and Web Form4.aspx respectively.

    A .sitemap file with the name web.sitemap is created and saved inside the project folder.

    What You've Accomplished

    When you bind your SiteMap control to the C1SiteMapDataSource control and run the project, Site Map nodes appear as shown in the image below. C1SiteMapNode1 and C1SiteMapNode3 are at level0, whereas C1SiteMapNode2 is a level1 node.