Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.NET refresh on event (timer or COM)

Posted on 2007-04-11
2
Medium Priority
?
627 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 750 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

721 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