Solved

ASP.NET refresh on event (timer or COM)

Posted on 2007-04-11
2
625 Views
Last Modified: 2008-02-01
Hi,

I'm not sure if this is possible but I'm having problems finding a solution :(

I have a website written in asp.net (C#) which connects to a C++ COM server for data which will be retrieved and used to update the webpage. Sending data to the COM server works perfectly.  Retrieving a response and updating the website is the problem.

I'm not sure how this is done professionally but here are the possibilities I've come up with:

- In the asp.net create a timer that on fire checks if there is new data in the COM server to be retrieved i.e simple values, retrieve the data, and send a refresh to update the page.
    - problems - create timer, and issue refresh

- Have a C++ event in the COM server and when triggered by the COM server to state that new data is ready to be retrieved, the asp.net picks up with event, retrieves the data and sends a refresh to update the page.
    - problems - accessing an C++ event in the COM server from asp.net, and issue refresh

Is this viable? If not, is there any alternatives?

Cheers,

Brent.
0
Comment
Question by:Brent-Campbell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
MogalManic earned 250 total points
ID: 18888692
Firstoff, a server cannot refresh a browser.  The HTTP protocol is a disconnected client.  The client only connects to the server.  There is no way for the server to connect to the client.

There are three way's that I see on doing this:
  1) Have a "refresh" button when the user clicks button, then refresh the page
  2) Setup a refresh timeout.  Either through javascript or html
      (http://www.hscripts.com/tutorials/html/autorefresh.php)  after timeout
      expires, automatically refresh the page
  3) Use AJAX to populate page results, periodically "polling" for changes and refreshing
      when results change.

The above options are in order of complexity and improved customer experience.  The 1st two options, will refresh the whole page, but are easier to implement.  Using AJAX would be the best way but might be difficult to implement.
0
 
LVL 6

Expert Comment

by:sara110
ID: 18889710
the best way for you , is using javascript for its timer, or use AJAX that you could retrieve your data and also refresh the page.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question