?
Solved

How can i get rid of asp:Menu flickering?

Posted on 2014-12-06
4
Medium Priority
?
729 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

741 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