Solved

How can i get rid of asp:Menu flickering?

Posted on 2014-12-06
4
653 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

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 143

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name Space error VS2015 1 36
Adding items to a C# list incrementally 5 61
reading excel file in .net 2 32
Dictionary and array of [N] size - performance tuned 12 41
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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