SimpsOff
SimpsOff

Reputation: 272

Adding a .ASCX item to the Sitemap

Is there a way to add .ascx files to a sitemap such that it will load/unload the controls based on the last ones visited? The problem is i have a page that contains a few controls that get placed under one another, and i'd like to just be able to jump between them with the sitemap instead of creating a new page for them... this is what i'm trying to put into the sitemap without luck (see Product List, Product Detail):

<siteMapNode url="Default.aspx" title="Home"  description="Home Page of _____">

    <siteMapNode url="UserFunctions/ChangePassword.aspx" title="Change Password"  description="Change Password" />
    <siteMapNode url="Setup/EditUsers.aspx" title="Edit Users"  description="Edit Users" />
    <siteMapNode url="Setup/EditOther.aspx" title="Edit Other"  description="Edit Other" />

    <siteMapNode url="DataEntry/EditPartners.aspx" title="Partners" description="Partners">
        <siteMapNode url="WebControls/Product List.ascx" title="Product List"  description="Product List" >
            <siteMapNode url="WebControls/ProductDetail.ascx" title="Product Detail" description="Product Detail" />
        </siteMapNode>
    </siteMapNode>

</siteMapNode>

Upvotes: 2

Views: 460

Answers (1)

Brian Mains
Brian Mains

Reputation: 50728

No, a user control only lives within the page; you could have a reference to product.aspx?category=, so you'd define a querystring value in the sitemap, and dynamically load the correct user control based upon that value. That would work, but not referencing a user control directly.

HTH.

Upvotes: 2

Related Questions