Sitemap, Menu control - formatting

Discussion in 'ASP .Net Web Controls' started by Trey Shaffer, Mar 27, 2007.

  1. Trey Shaffer

    Trey Shaffer Guest

    I'm new to ASP.net, and struggling with the sitemap and menu control.

    I guess my general question might be, "Where can I find a discussion of the
    format options for the control and the syntax of the sitemap?"

    I am working with a Que book on Expression Web, and a variety of online
    resources, like MSDN, but discussions of these topics are very short/basic,
    leaving me with just a tease.

    I would like to create a "typical" horizontal menu with the first/top level
    visible at all times. Each of the top items should have associated
    fly-out/drop-down items. Something like the following...


    || GPC Home || Newsletter || Membership || Hookbill
    Fair || Contact Us ||

    || Fair Visitors ||

    || Fair Vendors ||

    (Not sure how that will display, but the Visitors and Vendors items
    should be below the Hookbill Fair item.)


    I am having two basic problems. One I think is a formatting issue with the
    control. The other is the syntax of the sitemap.

    The sample sitemaps below should clarify. They are both "functional" in
    that they compile/run, but do not produce the desired result.

    The first produces a menu with a single top level item, "GPC Home" and six
    dynamic submenu items.

    The second produces a single top level item with three sub items. Closer,
    but the "Contact" item should be at the same level as "Newsletter,"
    "Membership," and "Hookbill Fair."


    Version One - single top-level, visisble item, "GPC Home" with six
    sub-items.

    GPC Home
    Newsletter
    Membership
    Hookbill Fair
    Fair Visitors
    Fair Vendors
    Contact Us

    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="~/Default.aspx" title="GPC Home" description="Improving
    the lives of Birds" >
    <siteMapNode url="~/Newsletter/Newsletter.aspx" title="Newsletter"
    description="Squawk 'n Talk" />
    <siteMapNode url="~/Membership/Membership.aspx" title="Membership"
    description="Join GPC" />

    <siteMapNode url="~/Fair/HookbillFair.aspx" title="Hookbill Fair"
    description="All American Hookbill Fair" />
    <siteMapNode url="~/Fair/Visitors.aspx" title="Fair Visitors"
    description="Information for Fair visitors" />
    <siteMapNode url="~/Fair/Vendors.aspx" title="Fair Vendors"
    description="Information for Fair vendors" />

    <siteMapNode url="~/Contact/Contact.aspx" title="Contact Us"
    description="Contact GPC" />
    </siteMapNode>
    </siteMap>



    Version Two

    GPC Home
    Newsletter
    Membership
    Hookbill Fair
    Fair Visitors
    Fair Vendors
    Contact Us

    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="~/Default.aspx" title="GPC Home" description="Improving
    the lives of Birds" >
    <siteMapNode url="~/Newsletter/Newsletter.aspx" title="Newsletter"
    description="Squawk 'n Talk" />
    <siteMapNode url="~/Membership/Membership.aspx" title="Membership"
    description="Join GPC" />

    <siteMapNode url="~/Fair/HookbillFair.aspx" title="Hookbill Fair"
    description="All American Hookbill Fair" >
    <siteMapNode url="~/Fair/Visitors.aspx" title="Fair Visitors"
    description="Information for Fair visitors" />
    <siteMapNode url="~/Fair/Vendors.aspx" title="Fair Vendors"
    description="Information for Fair vendors" />
    <siteMapNode/>

    <siteMapNode url="~/Contact/Contact.aspx" title="Contact Us"
    description="Contact GPC" />

    </siteMapNode>
    </siteMapNode>

    </siteMap>



    --
    Trey Shaffer
    Trey Shaffer, Mar 27, 2007
    #1
    1. Advertising

  2. Trey Shaffer

    Trey Shaffer Guest

    A self-reply, incase someone else has similar issue...

    Using the MS XML Notepad 2007 utility, I manipulated the XML in the semi-GUI
    interface, and saw the result in the sitemap text file to figure out how to
    create the navigation structure.

    As for the display of the control, it was just playing with the various
    parameters. Getting the horizontal display was almost intuitive, there is a
    parameter for vertical/horizontal display. The trick was to make the second
    level of the menu display static. It then appears on the same horizontal
    line with the "Home" link.




    "Trey Shaffer" <> wrote in message
    news:%...
    > I'm new to ASP.net, and struggling with the sitemap and menu control.
    >
    > I guess my general question might be, "Where can I find a discussion of
    > the format options for the control and the syntax of the sitemap?"
    >
    > I am working with a Que book on Expression Web, and a variety of online
    > resources, like MSDN, but discussions of these topics are very
    > short/basic, leaving me with just a tease.
    >
    > I would like to create a "typical" horizontal menu with the first/top
    > level visible at all times. Each of the top items should have associated
    > fly-out/drop-down items. Something like the following...
    >
    >
    > || GPC Home || Newsletter || Membership ||
    > Hookbill Fair || Contact Us ||
    >
    > || Fair Visitors ||
    >
    > || Fair Vendors ||
    >
    > (Not sure how that will display, but the Visitors and Vendors items
    > should be below the Hookbill Fair item.)
    >
    >
    > I am having two basic problems. One I think is a formatting issue with
    > the control. The other is the syntax of the sitemap.
    >
    > The sample sitemaps below should clarify. They are both "functional" in
    > that they compile/run, but do not produce the desired result.
    >
    > The first produces a menu with a single top level item, "GPC Home" and six
    > dynamic submenu items.
    >
    > The second produces a single top level item with three sub items. Closer,
    > but the "Contact" item should be at the same level as "Newsletter,"
    > "Membership," and "Hookbill Fair."
    >
    >
    > Version One - single top-level, visisble item, "GPC Home" with six
    > sub-items.
    >
    > GPC Home
    > Newsletter
    > Membership
    > Hookbill Fair
    > Fair Visitors
    > Fair Vendors
    > Contact Us
    >
    > <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    > <siteMapNode url="~/Default.aspx" title="GPC Home"
    > description="Improving the lives of Birds" >
    > <siteMapNode url="~/Newsletter/Newsletter.aspx" title="Newsletter"
    > description="Squawk 'n Talk" />
    > <siteMapNode url="~/Membership/Membership.aspx" title="Membership"
    > description="Join GPC" />
    >
    > <siteMapNode url="~/Fair/HookbillFair.aspx" title="Hookbill Fair"
    > description="All American Hookbill Fair" />
    > <siteMapNode url="~/Fair/Visitors.aspx" title="Fair Visitors"
    > description="Information for Fair visitors" />
    > <siteMapNode url="~/Fair/Vendors.aspx" title="Fair Vendors"
    > description="Information for Fair vendors" />
    >
    > <siteMapNode url="~/Contact/Contact.aspx" title="Contact Us"
    > description="Contact GPC" />
    > </siteMapNode>
    > </siteMap>
    >
    >
    >
    > Version Two
    >
    > GPC Home
    > Newsletter
    > Membership
    > Hookbill Fair
    > Fair Visitors
    > Fair Vendors
    > Contact Us
    >
    > <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    > <siteMapNode url="~/Default.aspx" title="GPC Home"
    > description="Improving the lives of Birds" >
    > <siteMapNode url="~/Newsletter/Newsletter.aspx" title="Newsletter"
    > description="Squawk 'n Talk" />
    > <siteMapNode url="~/Membership/Membership.aspx" title="Membership"
    > description="Join GPC" />
    >
    > <siteMapNode url="~/Fair/HookbillFair.aspx" title="Hookbill Fair"
    > description="All American Hookbill Fair" >
    > <siteMapNode url="~/Fair/Visitors.aspx" title="Fair Visitors"
    > description="Information for Fair visitors" />
    > <siteMapNode url="~/Fair/Vendors.aspx" title="Fair Vendors"
    > description="Information for Fair vendors" />
    > <siteMapNode/>
    >
    > <siteMapNode url="~/Contact/Contact.aspx" title="Contact Us"
    > description="Contact GPC" />
    >
    > </siteMapNode>
    > </siteMapNode>
    >
    > </siteMap>
    >
    >
    >
    > --
    > Trey Shaffer
    >
    Trey Shaffer, Mar 31, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AmitKu
    Replies:
    1
    Views:
    799
    Cowboy \(Gregory A. Beamer\)
    Sep 27, 2006
  2. Replies:
    0
    Views:
    334
  3. empire5
    Replies:
    1
    Views:
    576
    =?Utf-8?B?UmVuZ2E=?=
    Jan 11, 2007
  4. Learner
    Replies:
    5
    Views:
    270
    Dominick Baier [DevelopMentor]
    May 7, 2006
  5. J. Jespersen

    Tricky one regarding Menu control and SiteMap

    J. Jespersen, Sep 26, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    134
    clintonG
    Sep 26, 2005
Loading...

Share This Page