开发者

"Please wait..." between two page is not working correctly

I have login page which contains some images and ajax contorls, when this page gets refresh all layout and the way page appears, totally awkward. So, after quick searching in the google, I have taken a javascript method and calling this in page load event like this(), it's working fine but only after refreshing the page, means after loading page completely page is being shown.

But, problem still remains because before refreshing, page again starts with same awkward condition. So, do I need to call javascript method as soon as my page gets refresh or need to work on my css. Here is my javascript code....

 function hideBodyloader() {
        document.getElementById("bodyloader").style.display = "none";
    }

and css for div....

 #bodyloader
    {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 1000000000;
        background-color: white;
        display: block;
    }

    .bodyloader
    {
        text-align:left;
        color: Black;
        font-size: 13px;
        font-family: Arial, Helvetica, sans-serif;
    }

If there is another way to achieve this please a开发者_JAVA百科dvise me too, but should be on page refresh not on button event.

Thanks in advance, any suggestion would be appreciated.......:)


Whenever the page loads, including a post back, say, the user clicked a control that requires validation, hit the submit button, or anything of that sort, Page_Load is called. Now, if you want to do things in Page_Load but only when the page is first loading, we can do this too, like this:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            // do things that should only happen the first time the page loads in here
        }
    }

Also, there's an ASP.NET control called a Panel . You can put a bunch of controls, text, whatever inside of a ASP:Panel and then change the visibility of all those controls. uxLoginPanel.Visible=false; I think this will help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜