Solved

How can i get rid of asp:Menu flickering?

Posted on 2014-12-06
4
696 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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 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