Wrox Programmer Forums
|
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 June 20th, 2012, 02:33 PM
Registered User
 
Join Date: May 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter10: Placing Ajax controls

Hi,

This post is regarding a page flicker issue. I have a master page that link to multiple aspx pages, the master page includes one contact form and a menu bar. However, the flicker issue is not happening at all with the form. In this case, it is happening whenever I click on any menu item that links me to an aspx page (this only happens with IE9). To solve this issue, I thought maybe I should apply the concepts I learned in chapter 10 about the AJAX controls (Update Panel and Script Manager). So, I wrapped the menu list with an update panel and before it, I added a Script Manager control. Now I get the following error: "Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server. " Now, there is only one form allowed in the the master page, so how to overcome this flicker issue?

Thank you.
 
Old June 21st, 2012, 01:58 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,

By design, this is not going to work. The UpdatePanel avoids page flicker on postbacks. That is, when a page posts back to itself. This work because it only replaces the piece if HTML that has changed by the postback (the contents of the UpdatePanel's ContentTemplate).

When you request a new page you don't post back, but issue a GET request on a new ASPX page. The UpdatePanel has no way of dealing with this and as such you always get "page flicker". You can overcome this in IE by using some meta tags as explained here: http://imar.spaanjaars.com/314/smoot...ge-transitions Note, this only works in IE. Note 2: not sure if this still works in recent versions of IE; haven't used it in a while.

Finally, you can add the ScriptManager to the MasterPage as the first control in the form. This way, it's available to all pages. This does not solve the page flicker issue; I just mention it here for other cases where you need a ScriptManager control.

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!
 
Old June 21st, 2012, 08:00 PM
Registered User
 
Join Date: May 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Hi Imar,

Thank you so much for your very helpful replies!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax Extender Controls not working dotnetDeveloper ASP.NET 4 General Discussion 1 May 27th, 2010 04:33 PM
Other controls are overlapping AJAX calendar saket123 ASP.NET 2.0 Basics 5 August 13th, 2008 08:03 AM
problem with placing the controls in fixed positio progruby Wrox Book Feedback 0 May 20th, 2008 03:54 AM
Placing controls in containers at run time. HotBlue VB How-To 2 October 13th, 2006 05:58 PM
AJAX Use Search with HTMl controls and Datagrid Nikhil1978 Access ASP 0 December 27th, 2005 02:25 AM





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