Using callback function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a doubt in .net. Hope u could solve the problem. When u r free plz
consider this doubt.

I have created a component to run End of Day Tasks. Hope u know how much
time it takes to run a EOD. Say it takes about 20 min to complete its
execution. Now assume that u have more than 1000 tasks to be executed. Each
tasks can be of any type(component or stored procedure). I am executing the
tasks asynchronously. Now I give the input to the main component from a
screen from the client. Can i pass any message or value from the component to
the screen, before the component execution finishes.

For example:

I want to display "Task 1 started execution.." when the task1 gets started.
Then it should display completed message. Likewise For every tasks it should
return the message to the screen.

Regards,
Sivaraman.S
 
Define an event in your component. Have the thread that creates the
component listen to that event. The component can then raise events that
contain a message, and the listening program can handle the event, and
respond accordingly.
 
But i am not able to display that message in the screen immediately after i
receive it. It get displayed only after the execution of component.
 
If you fire off an event, that event handler gets executed immediately. You
should be able to update the display. You may need to fire off the component
on a separate thread.
 
In Windows application it is possible, I want it to be displayed on the web
browser. I tried using frames to display it by storing it in the session. But
the problem is, It gets displayed only after the execution is finished.
 
Better Reinstall it.But before that please make uninstall all the component
of Visual Studio.
 
lease events / strings to a proper place, or expose them from your this
EOD component.
create an aspx page which is able to access EOD components public
exposed strings/properties. and then display them in let say lablel.
just keep refreshing that aspx page at a proper interval.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top