locked
Stop Master Page Menu Flickering between postbacks RRS feed

  • Question

  • User-2093970359 posted

    Hi,

    I am writing a web application which consists of a master page (header / menus) which does not change and content pages. When I do something like click on a button it causes a post back which is correct but this redraws the whole screen and becomes annoying because every post back and the whole screen flickers.

    Is there a way to only refresh the content page?

    Many Thanks,

    -Sayed

    Wednesday, October 10, 2012 5:57 AM

Answers

  • User71929859 posted

    Hello,

    rest of the browsers like firefox, google chrome working fine

    There is no way that those browsers only update the content page when a post back happens. What's happening is those browsers load the page too quickly so you are not seeing the flickering. 

    Is there any other possible ways to make this work...

    Not really. I don't think you understood the use of master pages. Master pages serve as a template frame. But that doesn't mean it will be consistent across post backs. If you need the header/footer etc. to be remain while the inner page post backs, you have to use iframes. Forget about the master/content pages and redesign your site. First create a normal webpage with the design of master page. At the place of contentplaceholder, put an iframe. Load your content pages in to that iframe. You have to remove the master page from those content pages too.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 12, 2012 3:10 AM

All replies

  • User-1598965247 posted

    I think you have not used update panel in child pages. Use udpate panel and it enables only partial refresh of the page.

    Also add this code to after the <head> section of master page design which reduces flickering in IE

        <meta http-equiv="Page-Enter" content="blendTrans(Duration=.3)" />
        <meta http-equiv="Page-Exit" content="blendTrans(Duration=.3)" />



    Wednesday, October 10, 2012 6:38 AM
  • User-2093970359 posted

    I have used above code in head section but of no use. Am not using update panel because of reasons as almost all the pages have dynamic gridview with all possible manipulations.. and because of this update panel facing problems while doing manipulations inside grid. 

    Is there any other possible ways to make this work... rest of the browsers like firefox, google chrome working fine.. flickering is with IE... :(

    Wednesday, October 10, 2012 6:53 AM
  • User-1598965247 posted

    Above code which i suggested is to remove the flickering problem only for IE. It gives some fading effect while page flickers thus making flickering invisible

    Wednesday, October 10, 2012 7:36 AM
  • User-1822989843 posted

    Hi Sayed,

    I think its better to use ajax in these situations.. Lets see there are some workarounds of this problem but a permanent solution would be the use of ajax..

    Refer the links below:

    http://vikasweb.wordpress.com/2010/09/19/removing-flickering-and-postback-in-master-page-%E2%80%9Cfajax%E2%80%9D/

    http://forums.asp.net/t/1616475.aspx

    http://bluerobot.com/web/css/fouc.asp/

    http://stackoverflow.com/questions/1568203/how-do-i-keep-the-master-page-from-flickering

    Wednesday, October 10, 2012 7:51 AM
  • User-691245060 posted

    Is there a way to only refresh the content page?

    nope....you cannot...every content page request is a new one, so flickering cannot be removed...

    Thanks,

    Wednesday, October 10, 2012 2:53 PM
  • User71929859 posted

    Hello,

    rest of the browsers like firefox, google chrome working fine

    There is no way that those browsers only update the content page when a post back happens. What's happening is those browsers load the page too quickly so you are not seeing the flickering. 

    Is there any other possible ways to make this work...

    Not really. I don't think you understood the use of master pages. Master pages serve as a template frame. But that doesn't mean it will be consistent across post backs. If you need the header/footer etc. to be remain while the inner page post backs, you have to use iframes. Forget about the master/content pages and redesign your site. First create a normal webpage with the design of master page. At the place of contentplaceholder, put an iframe. Load your content pages in to that iframe. You have to remove the master page from those content pages too.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 12, 2012 3:10 AM