...

View Full Version : How to update graphics dynamically?



alexccw
01-29-2004, 05:57 PM
Hi Guys,

I am using ASP.Net for my web development.

I have a scenario here:
I will list out a whole list of records which user will do selection and updating (without saving to DB yet..) Then user will click the submit button.

In my Submit_onClick, I will loop through each records in the listing and perform some processing. This will take some time.

The question here is how do I update the web page dynamically, while I am processing the list of records.. I thought of using some Javascript to do the printout of processing statements.. but how can I call a Javascript function without finishing my process?

Please help. Thank you.


Regards,
Alex Chan

A1ien51
01-29-2004, 07:29 PM
you can call the javascript first and do something then after it loads start the processing.....

allida77
01-29-2004, 07:57 PM
I have had this article:

http://msdn.microsoft.com/msdnmag/issues/03/12/designpatterns/default.aspx

bookmarked for a while but I havent had time to go through it. I believe it covers what you are asking.

BTW it is loading a bit slow for me.

alexccw
01-30-2004, 04:11 AM
Hi Guys,

I must say that this is a great forum with all the experts..

Thank you once again. :o

Regards,
Alex Chan

M@rco
02-02-2004, 12:31 AM
Originally posted by alexccw
In my Submit_onClick, I will loop through each records in the listing and perform some processing. This will take some time. I realise that your problem is solved, but I am intrigued at why your script/processing would so long as to actually need to report its progress to the user... I feel that you may be treating the symptom rather than the cause!

What exactly is it doing? Are you sure you've optimized the processing as much as you can?

alexccw
02-02-2004, 03:26 PM
Hi,

My process include updating the lists of records that is listed in the datagrid.. while sending emails to each of the record holders. As sending emails and updating records could took some time and if there are more that 10 records, the time could takes up to 1 minute or so.. thus I need this piece of codes to keep my user known to the progress made so far.

Of course, I am in the midst of finding some better way of doing the updating and sending the mail.

Regards,
Alex Chan

M@rco
02-02-2004, 04:47 PM
How exactly are you sending the emails? You should be sending them asynchronously (i.e. they are sent as part of a background task instead of holding up the script as each one is sent), which is easily done with an external/relay mail server (e.g. Microsoft Exchange) or a sophisticated email component.

Doing it this way would make the script execute virtually instantly, leaving the mail server to work its way through the queue in its own time...

;)

alexccw
02-02-2004, 04:49 PM
May I know how can i do it asynchronously? I am doing on each recipent basis.

Regards,
Alex Chan

M@rco
02-02-2004, 04:55 PM
That all depends!

As I asked, how are you sending your emails at present? What component? Via what mail server? Running what?!!

:)

alexccw
02-02-2004, 04:58 PM
currently I am using Easymail Object v6.0. and using external ISP's SMTP. However in actual working environment, it could be using internal mail server.

M@rco
02-02-2004, 05:14 PM
Then it would seem that this is what you need:
http://www.quiksoft.com/smtpexpress/

;)

However, I don't see why you need custom components at all (unless they offer special features you need) - if you use the standard CDONTS or CDOSYS components in conjunction with your ISP's server (as a relay), the emails will be sent asychronously automatically.

Then again, from what you've said this should be happening with your current setup already, so I can only assume that your SMTP component is NOT sending via your ISP's mail server, and is instead sending each one directly (hence the delays)...

I suggest that you check that out before doing anything else...


Finally, does this make any difference?
http://www.quiksoft.com/support/techdocs/sample_view.asp?ID=1052&Query_ID=229678

;)

alexccw
02-03-2004, 11:08 AM
Hi M@rco,

Thanks for your helps. I have run thru the sample and realise that I didn't set the pipeline and will do so.

May I know how can I ensure that I am sending to the ISP mail server, which then it will do the relay..? Rather than what you mention of sending to the email directly?

Regards,
Alex Chan

M@rco
02-03-2004, 11:25 AM
Originally posted by alexccw
May I know how can I ensure that I am sending to the ISP mail server, which then it will do the relay..? Rather than what you mention of sending to the email directly?Somewhere in your script you should be specifying the SMTP server to send via.

;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum