Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2012, 09:28 PM
Authorized User
 
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Default I'm having trouble with the UpdatePanel. It is causing even more flicker.

I wrapped most of the content in my master page in an update panel so the page won't flicker but for some reason it actually is causing even more flicker. lol

Is there a better way to accomplish this and am I even doing this correctly?

This is the markup for my master page. It is very similar to how you have it in the book.

HTML Code:
      <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
      <ContentTemplate>
        
        <div id="MenuWrapper">
          <asp:Menu ID="Menu1" CssClass="MainMenu" runat="server" 
            DataSourceID="SiteMapDataSource1" Orientation="Horizontal" 
            StaticEnableDefaultPopOutImage="False">
          </asp:Menu>
          <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" 
            ShowExpandCollapse="False">
            <LevelStyles>
              <asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
            </LevelStyles>
          </asp:TreeView>
        </div>

        <div id="Breadcrumbs"> <asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath> 
         <br /> <br /> <br />
        </div>

        <div id="ExtraContent">
          Put something neat here
          <cc1:Editor ID="Editor1" runat="server" />

          <ajaxToolkit:Twitter ID="Twitter1" Visible="false" 
              Mode="Profile"
              ScreenName="" 
              runat="server" />
        </div>
      
       <div id="Sidebar">
          Select a Theme<br />
          <asp:DropDownList ID="ThemeList" runat="server" AutoPostBack="True" 
            onselectedindexchanged="ThemeList_SelectedIndexChanged" Width="105px">
            <asp:ListItem>Default</asp:ListItem>
            <asp:ListItem>Midnight</asp:ListItem>
            <asp:ListItem>DarkGrey</asp:ListItem>
          </asp:DropDownList> 
          <br />
          <UFC:Banner ID="Banner1" runat="server" DisplayDirection="Vertical"></UFC:Banner>
          <br />
          <br />
       </div>

         <div id="MainContent"> 
     
          <!-- Main Content Place Holder -->
          <asp:ContentPlaceHolder id="cpMainContent" runat="server">
          </asp:ContentPlaceHolder>
         </div>

        </ContentTemplate>
      </asp:UpdatePanel>

Last edited by IceThatJaw; January 12th, 2012 at 09:31 PM..
 
Old January 13th, 2012, 07:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Adding an UpdatePanel to a Master page doesn't make a lot of sense. When you browse from page to page, you issue a new reguest using GET which renders the UpdatePanel useless.

Instead, add it to content pages around specific areas you want to update without refreshing the entire page after a postback.

To smooth the transition between pages, take a look here: http://imar.spaanjaars.com/314/smoot...ge-transitions (IE only).

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
IceThatJaw (January 13th, 2012)
 
Old January 13th, 2012, 03:26 PM
Authorized User
 
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Excellent advice, I'll do that!
 
Old January 13th, 2012, 10:48 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by Imar View Post
Hi there,

Adding an UpdatePanel to a Master page doesn't make a lot of sense. When you browse from page to page, you issue a new reguest using GET which renders the UpdatePanel useless.

Instead, add it to content pages around specific areas you want to update without refreshing the entire page after a postback.

To smooth the transition between pages, take a look here: http://imar.spaanjaars.com/314/smoot...ge-transitions (IE only).

Cheers,

Imar
Do you not add a script manager proxy if you have a update panel in both your master page and your content pages as well. Could adding a script manager proxy help in this aforementioned situation?
Again thank you for your help to us all on these particular issues.
 
Old January 14th, 2012, 05:45 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Could adding a script manager proxy help in this aforementioned situation?
Not for browsing from page to page as that issues new GET requests requesting an entirely new page. The UpdatePanel only works on post backs, not on GET requests.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
No Flicker Firefox glenng BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 November 30th, 2009 03:38 PM
Session IDs Causing Trouble When Webtesting VSTS08 matt.m Visual Basic 2008 Essentials 0 March 20th, 2008 09:52 AM
Flicker Problem goyduyudu General .NET 0 March 8th, 2007 10:44 AM
onmousemove flicker interrupt Javascript How-To 1 December 18th, 2006 01:24 AM
Screen Flicker SerranoG Access 1 May 16th, 2004 03:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.