Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 2nd, 2004, 10:47 AM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default Minimizing impact of page refresh

Does anyone know if there is a way to minimize the visual impact of a screen refresh after a postback in ASP.NET?

Sometimes after an event (e.g. button click), the whole page seems to clear then re-draw itself. Although the page is always re-created after a postback, sometimes this is not very noticeable at all, but on other pages it is extremely noticable. I have the viewstate turned on on all controls and am checking for Page.IsPostBack in page load. Any ideas?
 
Old June 2nd, 2004, 11:09 AM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

...I've found the answer! Switch "smartNavigation" on

 
Old June 2nd, 2004, 11:13 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can turn on the "SmartNavigation" attribute of a page. This does several things:

A) Uses client-side code to do a "background" request of the page which reduces the "flicker" affect of the page refresh.
B) Automatically scrolls the page to the point where you were at so if your page is any longer than one screen, you don't get sent back to the top.
C) Sets the focus back to the control you were on when the postback occurred.

All together, the SmartNavigation affectively eliminates the visual impact. However, it does have one side effect. If the page takes a long time to process, the browser will appear as if it is not doing anything after you cause a postback event. Then suddenly the page will refresh. It can be a little confusing. The other side-affect is that if you go to look at the source code of the page, you won't see the actual source HTML, but usually just the first page hit's source HTML. This is due to the way the smart navigation happens. It uses some javascript and seems to actually make the request in a hidden <iframe>. Fortunately, this isn't really a problem for the users, just the developers.

Peter
-------------------------
Work smarter, not harder
 
Old June 2nd, 2004, 11:16 AM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Peter

 
Old December 21st, 2004, 02:42 PM
Authorized User
 
Join Date: Aug 2004
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I use <META HTTP-EQUIV="refresh" content="5;"> in the head section, the refresh occurs every 5 seconds but screen flickers a lot. I added Smartnavigation = "true", for the page and the refresh doesn't happen any more. do, I need to set anything else.

Thanks
Renu

 
Old December 21st, 2004, 02:51 PM
Authorized User
 
Join Date: Aug 2004
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, if I click refresh on the screen in the toolbar, it takes me to the login screen. In that case, i have to log back in. Why clicking refresh on the screen doesn't stay on the same page?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Impact when multiple server registered happygv SQL Server 2000 15 March 20th, 2007 02:03 AM
Need to "Refresh" page fskilnik Dreamweaver (all versions) 3 October 20th, 2005 10:49 AM
Minimizing download time D_J Pro JSP 2 September 29th, 2004 03:55 PM
page Refresh skicrud PHP How-To 2 August 25th, 2004 04:03 AM





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