Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2012, 02:33 PM
Registered User
Points: 25, Level: 1
Points: 25, Level: 1 Points: 25, Level: 1 Points: 25, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old June 21st, 2012, 01:58 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
  #3 (permalink)  
Old June 21st, 2012, 08:00 PM
Registered User
Points: 25, Level: 1
Points: 25, Level: 1 Points: 25, Level: 1 Points: 25, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:11 PM.


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