Solved

How can i get rid of asp:Menu flickering?

Posted on 2014-12-06
4
595 Views
Last Modified: 2014-12-22
I'm using ASP.net/C# with Visual Studio 2008. When any postback happens and the page gets rendered again the menu "flickers" for a moment and all  menu items are shown before a return to the normal display. I've found some suggestions, but nothing has worked so far.
0
Comment
Question by:dodgerfan
  • 2
  • 2
4 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40485606
this is the trick I read in some places (I presume you are using Master Pages?)
The flickering is because asp:Menu uses javascript to set some inline styles.

hence, set your css file:
#menu ul li ul
{
    display: none;
}

#menu ul li 
{
    position: relative; 
    float: left;
    list-style: none;
}

Open in new window


and the flickering should be gone.
the trick is that the display will be "none" by default (while building the menu) and then showing only what is needed when done, and not building "all visible" and then hiding what is not needed
0
 

Author Comment

by:dodgerfan
ID: 40485676
I am using a Master page. I did find that code and tried it, but the flicker still occurs. My style sheet is attached. Could I have something else in there messing with it?Site.css
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40488286
I found some contradictory information in some documents... some write that #menu should do, other places I find that .menu should do:
.menu ul li ul
{
    display: none;
}

.menu ul li 
{
    position: relative; 
    float: left;
    list-style: none;
}    

Open in new window

0
 

Author Comment

by:dodgerfan
ID: 40498136
This did not work, either. I'm still trying to figure it out but looking at different ways to render a menu, too.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now