Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 May 13th, 2004, 12:42 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refresh Client Screens

Is there a way to force the client's browser to refresh the screen?

What I'm looking to do is that every time an application variable is changed/updated, everyone viewing a corresponding page will be updated with the new information.
 
Old May 13th, 2004, 12:47 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not with normal ASPX pages (or any other standard Server Side technology).

Basically, the client requests a page, the server serves it, and then completely forgets about the client. So, as soon as a page has finished loading, there is no way you can get back at the client to refresh the page.

Usually in these scenario's, you can choose between (at least) two options:

1. Client Refresh
Add a <meta> tag or some JavaScript that refreshes the page from within the client. This means it will be "polling-driven" and not event driven.

2. Use Java / Flash / Active X
Using these programming environments, you could create a way to communicate directly with the client. If you're programming an Intranet app, this might work, but you'll get into big troubles if you need this for an Inter net application.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Beautiful Ones by Prince and the Revolution (Track 3 from the album: Purple Rain) What's This?
 
Old May 13th, 2004, 01:02 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, but then how do apps like MSN and AOL Instant Messenger work? They're constantly streaming data and keeping both windows updated. Granted, it's not a browser but I would think they would be similar in theory.
 
Old May 13th, 2004, 01:11 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

On the contrary. They are completely different from a browser / Web application.

These kind of applications are "connected" applications, in that they have (or can have) a continuous connection with another client or server. This connection often uses a specific port number (hence the troubles getting these kind of applications to work through firewalls etc). Over this connection, the communication takes place.

Bottom line is: these type of programs are connected, and a browser is disconnected.
For the application you want, you need to build a connected solution. You can do this outside the browser with most programming languages, or you need to use one of the technologies I mentioned (or others) if you want this to take place in the browser.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Optigan 1 by Blur (Track 13 from the album: 13) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
How to pass value between 2 pop up screens ? ganzy_ledzep26 Javascript How-To 1 March 30th, 2006 08:41 AM
Customizing MSI Setup screens debsoft General .NET 1 June 4th, 2004 01:26 AM
Customizing Installation Screens debsoft General .NET 0 May 26th, 2004 06:58 AM
Dual Screens Louisa Beginning VB 6 1 November 9th, 2003 05:44 PM





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