Ideas needed - sending emails with "progress bar"

D

Daves

Hi,
I'm using a asp.net 2.0 website to send out emails to users, the amount of
which can reach up to 1500 users. Obviously the code sending the emails has
to let the client know the mails are being sent out and display some kind of
progress indicator. How would you implement this?
Back in old asp 3.0 days I had a blank page where code did a
Response.Write(.."mail sent"...) for each mail sent, the layout had to be
simple because the page is not correct by HTML standard since the last
</div> or </table> isn't returned until everything those elements has been
returned (in this case the "mail sent" texts).

I had this idea of mixing server & client jscript code - having jscript on
client trigger the server to send next email, then grab the result code and
display etc... ?
 
D

Daves

hmm... I see in your article how I can call the send() method without
waiting for it to finish but still I don't see how I can use that to update
a progress bar on client side?
 
D

DKode

what you could do is have a meta refresh on the client side, like a
popup or something, everytime it refreshses, it gets a new value from
the server to display the progress, this is as far as I have ever gone
with a progress bar in ASP.net
 
D

DKode

Just thought of something else:

take a look at AJAX

you can set a javascript timer that will send a request to the server
without a page refresh, you could get the progress from a server object
and then update the values on the client side.

AJAX allows you to send server requests from the client without needed
to do another post. its pretty easy to implement as well

heres an article explaining how to get started with AJAX:

http://www.developerfusion.co.uk/show/4704/

theres also an article on MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNetSpicedAjax.asp
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top