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 August 10th, 2010, 06:35 PM
Authorized User
 
Join Date: Jul 2010
Posts: 23
Thanks: 7
Thanked 2 Times in 1 Post
Default Full reload of page

Hello, when i visitit www.PlanetWrox.com and press one of the buttons to change the page in the "cpMainContent" placeholder, only the part in the placeholder reloads. When i look at the Final WebSite i downloaded with the source code the entire page reloads when i click one of the buttons.

Is there a difference between the pages? Or have i missed something? I am at chapter 11 atm.

By the way i have never enjoyed coding as much as i am now with this book.
 
Old August 11th, 2010, 02:50 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,

Can you be more specific about the page you're referring to? Some pages do a full reload, others don't so I need to know which one you're talking about before I can see what you mean and explain the difference. Maybe you can post the page's exact URL?

Quote:
By the way i have never enjoyed coding as much as i am now with this book.
Thank you. That's great to hear!

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 August 11th, 2010, 10:53 AM
Authorized User
 
Join Date: Jul 2010
Posts: 23
Thanks: 7
Thanked 2 Times in 1 Post
Default

I open the C:\BegASPNET\Source\Final website in VWD and view it in a browser.

When i click for example the home button the entire page is reloaded in my browser.

When i open http://aspnet4.planetwrox.com/Default.aspx and view it in my browser it looks alot better:

When i click the home button, or any other button only the content page is reloaded. The header, menu and footer doesnt flicker at all.
 
Old August 11th, 2010, 11:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

There's nothing special going on. On the Wrox site the page completely reloads as well (you can look at the progress bar at the bottom of the screen in IE). It's on a fast server, but with a relatively slow network connection. The code used by the live site *is* the exact same version as the Final folder you downloaded.

What browser are you using? Maybe switching to another speeds things up a little?

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 August 11th, 2010, 12:23 PM
Authorized User
 
Join Date: Jul 2010
Posts: 23
Thanks: 7
Thanked 2 Times in 1 Post
Default

I use Chrome. The C:\BegASPNET\Source\Final site was alot faster with Firefox.

But anyhow, how could i make a Menu and Header "static"? So it will not refresh on a redirect. Like on this site for example, it seems to not flicker at all.

Edit: Never mind me, every time i start to think i just confuse myself even more. :)

Last edited by andreas5; August 11th, 2010 at 12:38 PM..
 
Old August 11th, 2010, 03:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I can try to make it a bit clearer....

Basically, there are two page models: a complete refresh (a reload of the same page or a request for an entirely new page) or a postback using AJAX.

For most pages, the Planet Wrox site uses the first option: for example, when you go from Home to Reviews a completely new page is requested. Since it is a completely new page, you can't leave the header and footer in place. However, you can give the user the impression some parts remain by:

a) Implement a consistent design
b) Make your site fast. By using minimal HTML and cacheable CSS, the new data that is requested is quite small and thus the browser can quickly redraw the screen, giving you the *impression* only part of the page is redrawn. This isn't true, but that's how it's perceived because of the speed at which it happens.

Additionally, for Internet Explorer you can smooth out page transitions as described here:
http://imar.spaanjaars.com/314/smoot...ge-transitions

The other model uses AJAX. This is explained in-depth in chapter 10 of this book where AJAX and the UpdatePanel are discussed. You see a live demo of that in the Contact Page / User Control.

Hope this clarifies, and not further confuses matters.... ;-)

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 August 12th, 2010, 09:36 AM
Authorized User
 
Join Date: Jul 2010
Posts: 23
Thanks: 7
Thanked 2 Times in 1 Post
Default

Thanks for great support. I am surprised how much faster some browsers load pages, atleast through VWD.

edit: Typo

Last edited by andreas5; August 12th, 2010 at 09:41 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
reload parent page from included page sbkumar Javascript 2 July 24th, 2008 03:56 PM
Reload page Tooltip not work - Reload xslt file? ismailc XSLT 10 January 22nd, 2008 10:03 AM
Reload page only once. rupen Javascript How-To 4 September 13th, 2007 06:34 AM
I want page to not reload omersharp ASP.NET 2.0 Professional 0 December 13th, 2006 07:06 PM
Reload a page mivan2001 Javascript How-To 1 July 23rd, 2003 03:25 AM





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