Is there some way I can get the Windows type action with <asp:Menu>

Discussion in 'ASP .Net' started by Cal Who, Jan 16, 2010.

  1. Cal Who

    Cal Who Guest

    I use the <asp:Menu> element but one thing that always bothered me is that:

    In windows if I click the top menu item, say File or View, the menu drop
    down appears but with asp:Menu the user is taken to a new page.

    Must be confusing to someone who does not use it a lot.

    Is there some way I can get the Windows type action?

    I tried not specifying a URL in the site map but then the menu item does not
    show at all.

    Does asp:Menu change in Asp.Net 4.0?





    Thanks
     
    Cal Who, Jan 16, 2010
    #1
    1. Advertising

  2. Cal Who

    Bogdan Jokel Guest

    " Cal Who" <> wrote in message
    news:%...
    >I use the <asp:Menu> element but one thing that always bothered me is that:
    >
    > In windows if I click the top menu item, say File or View, the menu drop
    > down appears but with asp:Menu the user is taken to a new page.
    >
    > Must be confusing to someone who does not use it a lot.
    >
    > Is there some way I can get the Windows type action?
    >
    > I tried not specifying a URL in the site map but then the menu item does
    > not show at all.
    >
    > Does asp:Menu change in Asp.Net 4.0?
    >
    >
    >
    >
    >
    > Thanks
    >


    The user will be taken to a new page only if there is a valid url associated
    with the menu item. For example, site map is quite often used with menus.
    If you'd like a menu item behave like a pop-up only then make sure that the
    corresponding site map node has a title but no url (ie. url should be
    blank).

    Bogdan
     
    Bogdan Jokel, Jan 16, 2010
    #2
    1. Advertising

  3. Cal Who

    Cal Who Guest

    I hope you're correct but I tried

    <siteMapNode title="HtmlEditor"

    url=" "

    description="FreeTextBox Editor">

    <siteMapNode title="Info"

    url="HtmlEditor/Info.aspx"

    description="Info About FreeTextBox Editor"/>

    </siteMapNode>

    And

    url=""

    And also with no url mentioned at all.

    And with both the url and description removed

    In all cases the menu item did not show.



    Tried

    url="JUNK"

    which showed but crashed when clicked.



    Have you actually done what you said and had it work?

    Maybe it a CSS thing?



    Thanks












    "Bogdan Jokel" <> wrote in message
    news:...
    >
    > " Cal Who" <> wrote in message
    > news:%...
    >>I use the <asp:Menu> element but one thing that always bothered me is
    >>that:
    >>
    >> In windows if I click the top menu item, say File or View, the menu drop
    >> down appears but with asp:Menu the user is taken to a new page.
    >>
    >> Must be confusing to someone who does not use it a lot.
    >>
    >> Is there some way I can get the Windows type action?
    >>
    >> I tried not specifying a URL in the site map but then the menu item does
    >> not show at all.
    >>
    >> Does asp:Menu change in Asp.Net 4.0?
    >>
    >>
    >>
    >>
    >>
    >> Thanks
    >>

    >
    > The user will be taken to a new page only if there is a valid url
    > associated with the menu item. For example, site map is quite often used
    > with menus. If you'd like a menu item behave like a pop-up only then make
    > sure that the corresponding site map node has a title but no url (ie. url
    > should be blank).
    >
    > Bogdan
    >
    >
     
    Cal Who, Jan 17, 2010
    #3
  4. Cal Who

    Bogdan Jokel Guest

    It does work. I've been using sitemap + menu from asp.net 2.0 to 3.5.
    There are many other ugly things that you might need to deal with but the
    one you are trying to solve should be a non-issue.
    For example, the following is a snippet from a working sitemap that works
    with asp menu:
    <siteMapNode roles="Administrators,Managers,Editors" title="Reports">

    <siteMapNode roles="Administrators,Managers,Editors"
    url="~/Reports/wizReport1.aspx" title="Report1" description ="Prints
    report1" />

    [...]

    Clicking on the "Reports" menu item opens a pop-up menu with "Report1" as
    the first item.

    Bogdan




    " Cal Who" <> wrote in message
    news:...
    >I hope you're correct but I tried
    >
    > <siteMapNode title="HtmlEditor"
    >
    > url=" "
    >
    > description="FreeTextBox Editor">
    >
    > <siteMapNode title="Info"
    >
    > url="HtmlEditor/Info.aspx"
    >
    > description="Info About FreeTextBox Editor"/>
    >
    > </siteMapNode>
    >
    > And
    >
    > url=""
    >
    > And also with no url mentioned at all.
    >
    > And with both the url and description removed
    >
    > In all cases the menu item did not show.
    >
    >
    >
    > Tried
    >
    > url="JUNK"
    >
    > which showed but crashed when clicked.
    >
    >
    >
    > Have you actually done what you said and had it work?
    >
    > Maybe it a CSS thing?
    >
    >
    >
    > Thanks
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > "Bogdan Jokel" <> wrote in message
    > news:...
    >>
    >> " Cal Who" <> wrote in message
    >> news:%...
    >>>I use the <asp:Menu> element but one thing that always bothered me is
    >>>that:
    >>>
    >>> In windows if I click the top menu item, say File or View, the menu drop
    >>> down appears but with asp:Menu the user is taken to a new page.
    >>>
    >>> Must be confusing to someone who does not use it a lot.
    >>>
    >>> Is there some way I can get the Windows type action?
    >>>
    >>> I tried not specifying a URL in the site map but then the menu item does
    >>> not show at all.
    >>>
    >>> Does asp:Menu change in Asp.Net 4.0?
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> Thanks
    >>>

    >>
    >> The user will be taken to a new page only if there is a valid url
    >> associated with the menu item. For example, site map is quite often used
    >> with menus. If you'd like a menu item behave like a pop-up only then make
    >> sure that the corresponding site map node has a title but no url (ie. url
    >> should be blank).
    >>
    >> Bogdan
    >>
    >>

    >
    >
     
    Bogdan Jokel, Jan 17, 2010
    #4
  5. Cal Who

    Cal Who Guest

    It's the Roles that does it. Academically, it would be great if you could
    confirm by trying it with the line

    <siteMapNode title="Reports">

    I tried adding the ~ to URLs. Didn't fix it.
    Then I added a role and that fixed it.

    The thing is, I don't want to restrict access to most of my top menu items.
    Do you have everyone log in?

    Thanks very much. I've ask this twice in the past with no response though I
    usually get one in this NG. So I wonder how common that knowledge is.

    Thanks again

    And I would be interested to know if you can confirm.




    "Bogdan Jokel" <> wrote in message
    news:...
    > It does work. I've been using sitemap + menu from asp.net 2.0 to 3.5.
    > There are many other ugly things that you might need to deal with but the
    > one you are trying to solve should be a non-issue.
    > For example, the following is a snippet from a working sitemap that works
    > with asp menu:
    > <siteMapNode roles="Administrators,Managers,Editors" title="Reports">
    >
    > <siteMapNode roles="Administrators,Managers,Editors"
    > url="~/Reports/wizReport1.aspx" title="Report1" description ="Prints
    > report1" />
    >
    > [...]
    >
    > Clicking on the "Reports" menu item opens a pop-up menu with "Report1" as
    > the first item.
    >
    > Bogdan
    >
    >
    >
    >
    > " Cal Who" <> wrote in message
    > news:...
    >>I hope you're correct but I tried
    >>
    >> <siteMapNode title="HtmlEditor"
    >>
    >> url=" "
    >>
    >> description="FreeTextBox Editor">
    >>
    >> <siteMapNode title="Info"
    >>
    >> url="HtmlEditor/Info.aspx"
    >>
    >> description="Info About FreeTextBox Editor"/>
    >>
    >> </siteMapNode>
    >>
    >> And
    >>
    >> url=""
    >>
    >> And also with no url mentioned at all.
    >>
    >> And with both the url and description removed
    >>
    >> In all cases the menu item did not show.
    >>
    >>
    >>
    >> Tried
    >>
    >> url="JUNK"
    >>
    >> which showed but crashed when clicked.
    >>
    >>
    >>
    >> Have you actually done what you said and had it work?
    >>
    >> Maybe it a CSS thing?
    >>
    >>
    >>
    >> Thanks
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> "Bogdan Jokel" <> wrote in message
    >> news:...
    >>>
    >>> " Cal Who" <> wrote in message
    >>> news:%...
    >>>>I use the <asp:Menu> element but one thing that always bothered me is
    >>>>that:
    >>>>
    >>>> In windows if I click the top menu item, say File or View, the menu
    >>>> drop down appears but with asp:Menu the user is taken to a new page.
    >>>>
    >>>> Must be confusing to someone who does not use it a lot.
    >>>>
    >>>> Is there some way I can get the Windows type action?
    >>>>
    >>>> I tried not specifying a URL in the site map but then the menu item
    >>>> does not show at all.
    >>>>
    >>>> Does asp:Menu change in Asp.Net 4.0?
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> Thanks
    >>>>
    >>>
    >>> The user will be taken to a new page only if there is a valid url
    >>> associated with the menu item. For example, site map is quite often
    >>> used with menus. If you'd like a menu item behave like a pop-up only
    >>> then make sure that the corresponding site map node has a title but no
    >>> url (ie. url should be blank).
    >>>
    >>> Bogdan
    >>>
    >>>

    >>
    >>

    >
    >
     
    Cal Who, Jan 17, 2010
    #5
  6. Cal Who

    Cal Who Guest

    I found the last item I needed:
    roles="*"



    Thanks a lot.



    " Cal Who" <> wrote in message
    news:...
    > It's the Roles that does it. Academically, it would be great if you could
    > confirm by trying it with the line
    >
    > <siteMapNode title="Reports">
    >
    > I tried adding the ~ to URLs. Didn't fix it.
    > Then I added a role and that fixed it.
    >
    > The thing is, I don't want to restrict access to most of my top menu
    > items. Do you have everyone log in?
    >
    > Thanks very much. I've ask this twice in the past with no response though
    > I usually get one in this NG. So I wonder how common that knowledge is.
    >
    > Thanks again
    >
    > And I would be interested to know if you can confirm.
    >
    >
    >
    >
    > "Bogdan Jokel" <> wrote in message
    > news:...
    >> It does work. I've been using sitemap + menu from asp.net 2.0 to 3.5.
    >> There are many other ugly things that you might need to deal with but the
    >> one you are trying to solve should be a non-issue.
    >> For example, the following is a snippet from a working sitemap that works
    >> with asp menu:
    >> <siteMapNode roles="Administrators,Managers,Editors" title="Reports">
    >>
    >> <siteMapNode roles="Administrators,Managers,Editors"
    >> url="~/Reports/wizReport1.aspx" title="Report1" description ="Prints
    >> report1" />
    >>
    >> [...]
    >>
    >> Clicking on the "Reports" menu item opens a pop-up menu with "Report1" as
    >> the first item.
    >>
    >> Bogdan
    >>
    >>
    >>
    >>
    >> " Cal Who" <> wrote in message
    >> news:...
    >>>I hope you're correct but I tried
    >>>
    >>> <siteMapNode title="HtmlEditor"
    >>>
    >>> url=" "
    >>>
    >>> description="FreeTextBox Editor">
    >>>
    >>> <siteMapNode title="Info"
    >>>
    >>> url="HtmlEditor/Info.aspx"
    >>>
    >>> description="Info About FreeTextBox Editor"/>
    >>>
    >>> </siteMapNode>
    >>>
    >>> And
    >>>
    >>> url=""
    >>>
    >>> And also with no url mentioned at all.
    >>>
    >>> And with both the url and description removed
    >>>
    >>> In all cases the menu item did not show.
    >>>
    >>>
    >>>
    >>> Tried
    >>>
    >>> url="JUNK"
    >>>
    >>> which showed but crashed when clicked.
    >>>
    >>>
    >>>
    >>> Have you actually done what you said and had it work?
    >>>
    >>> Maybe it a CSS thing?
    >>>
    >>>
    >>>
    >>> Thanks
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> "Bogdan Jokel" <> wrote in message
    >>> news:...
    >>>>
    >>>> " Cal Who" <> wrote in message
    >>>> news:%...
    >>>>>I use the <asp:Menu> element but one thing that always bothered me is
    >>>>>that:
    >>>>>
    >>>>> In windows if I click the top menu item, say File or View, the menu
    >>>>> drop down appears but with asp:Menu the user is taken to a new page.
    >>>>>
    >>>>> Must be confusing to someone who does not use it a lot.
    >>>>>
    >>>>> Is there some way I can get the Windows type action?
    >>>>>
    >>>>> I tried not specifying a URL in the site map but then the menu item
    >>>>> does not show at all.
    >>>>>
    >>>>> Does asp:Menu change in Asp.Net 4.0?
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>> Thanks
    >>>>>
    >>>>
    >>>> The user will be taken to a new page only if there is a valid url
    >>>> associated with the menu item. For example, site map is quite often
    >>>> used with menus. If you'd like a menu item behave like a pop-up only
    >>>> then make sure that the corresponding site map node has a title but no
    >>>> url (ie. url should be blank).
    >>>>
    >>>> Bogdan
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Cal Who, Jan 17, 2010
    #6
    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. John Blair
    Replies:
    1
    Views:
    636
  2. Aray
    Replies:
    1
    Views:
    561
  3. vyshu
    Replies:
    1
    Views:
    2,703
    Richard Senior
    Apr 27, 2007
  4. AAaron123
    Replies:
    1
    Views:
    845
    AAaron123
    Mar 11, 2009
  5. Evgeniy Dolzhenko
    Replies:
    7
    Views:
    163
    Jean-François Trân
    Oct 21, 2008
Loading...

Share This Page