Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. CSS OVERLAPPING MENU?? (URGENT!)

CSS OVERLAPPING MENU?? (URGENT!)

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netdatabasecom
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J John Sundar

    Currently i m using ASP.NET with C# (.net 2005, 2.0 framework) http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm from the above like i download the menu and implemented. but the thing is, when i put the dropdown menu bar by separatiing in , the menu is not getting dropdown... how to overcome it? help me plz.. ITS URGENT!"

    E Offline
    E Offline
    Eduard Keilholz
    wrote on last edited by
    #2

    First of all, why do you scream in your subject Second... Every post here is urgent... ofcourse... Third... Why use frames?? Use tables instead and you're done...

    .: I love it when a plan comes together :. http://www.zonderpunt.nl

    E 1 Reply Last reply
    0
    • E Eduard Keilholz

      First of all, why do you scream in your subject Second... Every post here is urgent... ofcourse... Third... Why use frames?? Use tables instead and you're done...

      .: I love it when a plan comes together :. http://www.zonderpunt.nl

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #3

      I wouldnt use frames Use div tags to do your layout

      J 1 Reply Last reply
      0
      • E eyeseetee

        I wouldnt use frames Use div tags to do your layout

        J Offline
        J Offline
        John Sundar
        wrote on last edited by
        #4

        acutally i m trying to split the screen into two so that the top frame may have the menu according to the login's (user,validator,supervisor) all these three users have different menubars. the bottom frame will contain the pages.

        1 Reply Last reply
        0
        • J John Sundar

          Currently i m using ASP.NET with C# (.net 2005, 2.0 framework) http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm from the above like i download the menu and implemented. but the thing is, when i put the dropdown menu bar by separatiing in , the menu is not getting dropdown... how to overcome it? help me plz.. ITS URGENT!"

          J Offline
          J Offline
          Jesse Squire
          wrote on last edited by
          #5

          The other responses are correct in that your problem appears to stem from your use of frames. For all intents and purposes, the boundaries of a frame are treated just like a browser, from the content's point of view. What this means is that you will never be able to have your menus extend outside of their containing frame. Because the menu is contained within the frames, when it drops down, it must do so in the same frame. I would venture to guess that the containing frame is too small to display the drop down content. It would seem to be that your best option is to reconsider your use of frames. I understand that you are attempting to display a different menu depending on the role that the current user holds. Is there a reason that you are unable to implement that decision on the server-side? For example, one thing that you may consider is to create each version of your menu as a user control (using div tags, not frames) and dynamically loading that based on your user's role. Lets assume that you left a Placeholder control in the markup where you wanted to inject your menu. The code would look something like:

          MyMenuControl myMenu = null;

          if (this.User.IsInRole("Admin"))

          {

          myMenu = (MyMenuControl)LoadControl("~/menus/adminMenu.ascx");

          }

          else if (this.User.IsInRole("SomeRole"))

          {

          myMenu = (MyMenuControl)LoadControl("~/menus/someRoleMenu.ascx");

          }

          else

          {

          J 1 Reply Last reply
          0
          • J Jesse Squire

            The other responses are correct in that your problem appears to stem from your use of frames. For all intents and purposes, the boundaries of a frame are treated just like a browser, from the content's point of view. What this means is that you will never be able to have your menus extend outside of their containing frame. Because the menu is contained within the frames, when it drops down, it must do so in the same frame. I would venture to guess that the containing frame is too small to display the drop down content. It would seem to be that your best option is to reconsider your use of frames. I understand that you are attempting to display a different menu depending on the role that the current user holds. Is there a reason that you are unable to implement that decision on the server-side? For example, one thing that you may consider is to create each version of your menu as a user control (using div tags, not frames) and dynamically loading that based on your user's role. Lets assume that you left a Placeholder control in the markup where you wanted to inject your menu. The code would look something like:

            MyMenuControl myMenu = null;

            if (this.User.IsInRole("Admin"))

            {

            myMenu = (MyMenuControl)LoadControl("~/menus/adminMenu.ascx");

            }

            else if (this.User.IsInRole("SomeRole"))

            {

            myMenu = (MyMenuControl)LoadControl("~/menus/someRoleMenu.ascx");

            }

            else

            {

            J Offline
            J Offline
            John Sundar
            wrote on last edited by
            #6

            Thaks a lot for ur kind reply jesse. i try to implement these things. i had some doubts too. can u help me plz? 1. this "MyMenuControl" specifies which control. i give this name to the place holder. but error is occuring as... "'project1.Testpage.MyMenuControl' is a 'field' but is used like a 'type'" 2. whats the exact process of isinrole operation. i refer many sites. i cant get the exact answer. help me. 3. The thing exactly i required is... i capture the status of the logins (user=1 and validator=2 and admin=3) and store it in the "int_status" variable. if int_status=1, the adminmenu.ascx is to get activate. Help me ... thanks in advance.

            J 1 Reply Last reply
            0
            • J John Sundar

              Thaks a lot for ur kind reply jesse. i try to implement these things. i had some doubts too. can u help me plz? 1. this "MyMenuControl" specifies which control. i give this name to the place holder. but error is occuring as... "'project1.Testpage.MyMenuControl' is a 'field' but is used like a 'type'" 2. whats the exact process of isinrole operation. i refer many sites. i cant get the exact answer. help me. 3. The thing exactly i required is... i capture the status of the logins (user=1 and validator=2 and admin=3) and store it in the "int_status" variable. if int_status=1, the adminmenu.ascx is to get activate. Help me ... thanks in advance.

              J Offline
              J Offline
              Jesse Squire
              wrote on last edited by
              #7
              1. In my example, MyMenuControl was the base type that I used to derrive my different menu controls from. When you load a control using the LoadControl method, it is returned as type object. You will need to cast it before putting into a placeholder. If you did not have a common base class for your menu, use UserControl for your cast. 2) IsInRole is the built-in mechanism for determining whether the user has a given security role in your application, when using the standard ASP.NET role-based security model. If you are interested in more information, please reference a link or two from this Google[^] search. 3) You answered your own question here. Test the value of your int_status variable. If it has the value you desire, load your adminmenu.ascx control. Once loaded, add the adminmenu.ascx control to the Controls collection of one of the objects on your page. If you're still struggling, take another look at my example. It demonstrates the core operations for this. Simply replace the if condition with your int_status test, replace MyMenuControl variable/cast with the type of your adminmenu.ascx, and replace MenuPlaceHolder with your desired menu container. Hope that helps. :)

              --Jesse

              "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

              J 1 Reply Last reply
              0
              • J Jesse Squire
                1. In my example, MyMenuControl was the base type that I used to derrive my different menu controls from. When you load a control using the LoadControl method, it is returned as type object. You will need to cast it before putting into a placeholder. If you did not have a common base class for your menu, use UserControl for your cast. 2) IsInRole is the built-in mechanism for determining whether the user has a given security role in your application, when using the standard ASP.NET role-based security model. If you are interested in more information, please reference a link or two from this Google[^] search. 3) You answered your own question here. Test the value of your int_status variable. If it has the value you desire, load your adminmenu.ascx control. Once loaded, add the adminmenu.ascx control to the Controls collection of one of the objects on your page. If you're still struggling, take another look at my example. It demonstrates the core operations for this. Simply replace the if condition with your int_status test, replace MyMenuControl variable/cast with the type of your adminmenu.ascx, and replace MenuPlaceHolder with your desired menu container. Hope that helps. :)

                --Jesse

                "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

                J Offline
                J Offline
                John Sundar
                wrote on last edited by
                #8

                Thanks a lot JESSE..i implemented.. now only i m looking how its easy. but without you, i cant achieve.... "KNOWN IS DROP. UNKNOWN IS OCEAN" :-O if (TextBox2.Text == "1") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("admin_header.ascx")); else if (TextBox2.Text == "2") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("User_Header.ascx")); else if (TextBox2.Text == "3") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("Validator_Header.ascx")); // where MenuPlaceHolder is the id of PlaceHolder

                J 1 Reply Last reply
                0
                • J John Sundar

                  Thanks a lot JESSE..i implemented.. now only i m looking how its easy. but without you, i cant achieve.... "KNOWN IS DROP. UNKNOWN IS OCEAN" :-O if (TextBox2.Text == "1") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("admin_header.ascx")); else if (TextBox2.Text == "2") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("User_Header.ascx")); else if (TextBox2.Text == "3") this.MenuPlaceHolder.Controls.Add((UserControl)LoadControl("Validator_Header.ascx")); // where MenuPlaceHolder is the id of PlaceHolder

                  J Offline
                  J Offline
                  Jesse Squire
                  wrote on last edited by
                  #9

                  Happy to help, John. I'm glad to hear that its working. :)

                  --Jesse

                  "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

                  J 1 Reply Last reply
                  0
                  • J Jesse Squire

                    Happy to help, John. I'm glad to hear that its working. :)

                    --Jesse

                    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

                    J Offline
                    J Offline
                    John Sundar
                    wrote on last edited by
                    #10

                    hai to everyone and Jesse....! can i know how to achieve the overlapping concept in menu? or where can i find the FREE MENU's, so that i can generate it and the overlapping is to be avoided. in the below link, the overlapping is avoided. but i cant populate the sub menus.... "http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm" help me - KARAN

                    1 Reply Last reply
                    0
                    • J John Sundar

                      Currently i m using ASP.NET with C# (.net 2005, 2.0 framework) http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm from the above like i download the menu and implemented. but the thing is, when i put the dropdown menu bar by separatiing in , the menu is not getting dropdown... how to overcome it? help me plz.. ITS URGENT!"

                      P Offline
                      P Offline
                      Paul Conrad
                      wrote on last edited by
                      #11

                      John Sundar wrote:

                      ITS URGENT!

                      How impolite :|

                      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups