Click here to Skip to main content
16,018,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My MenuItem Like this:

Menu1 Menu2 Menu3 Menu4


My asp.net code:
XML
<%@ Page Title="" Language="C#" MasterPageFile="~/Student/student.Master" AutoEventWireup="true"
    CodeBehind="AI.aspx.cs" Inherits="Virtual_Classroom.Student.AI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="height: 500px; width: 920px; overflow: Auto">
        <asp:DataList ID="DataList1" Visible="true" runat="server" AutoGenerateColumns="false"
            RepeatColumns="2" CellSpacing="5">
            <ItemTemplate>
                <u>
                    <%# Eval("Name") %></u>
                <hr />
                <a class="player" style="height: 300px; width: 445px; display: block" href='<%# Eval("Id", "Handler.ashx?Id={0}") %>'>
                </a>
            </ItemTemplate>
        </asp:DataList>
    </div>
    <script src="FlowPlayer/flowplayer-3.2.12.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        flowplayer("a.player", "FlowPlayer/flowplayer-3.2.16.swf", {
            plugins: {
                pseudo: { url: "FlowPlayer/flowplayer.pseudostreaming-3.2.12.swf" }
            },
            clip: { provider: 'pseudo', autoPlay: false }
        });
    </script>
</asp:Content>


When i loading this page My menu item change like this: Horzontal to vertical(3 Seconds)

Menu1

Menu2

Menu3

Menu4

please help me........How to avoid page rendering when loading this page
Posted

1 solution

That is because your CSS (or if you're stylizing your elements using JavaScript, then JavaScript) is not loaded at this time. Once it gets loaded, the list turn horizontal once again. That is a network based problem, or a disk-latency based problem to provide you with the resource.

Chances are that you're having a heavier resource being downloaded (you're having media player included also and it is also loading a video)... So my suggestion would be to load your style sheets before loading other scripts and other resources or loading other resources (such as videos or media content) after the DOM has finished loading. This way, you will be able to create a consistent feel, and you can show "_Loading_" image to the client to let him know that you are now loading the content for him.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900