Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2004, 04:57 PM   PM User | #1
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
Question How to update graphics dynamically?

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
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 01-29-2004, 06:29 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
you can call the javascript first and do something then after it loads start the processing.....
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 01-29-2004, 06:57 PM   PM User | #3
allida77
Regular Coder

 
Join Date: Jun 2002
Location: Cincinnati, OH
Posts: 545
Thanks: 0
Thanked 0 Times in 0 Posts
allida77 is an unknown quantity at this point
I have had this article:

http://msdn.microsoft.com/msdnmag/is...s/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.
allida77 is offline   Reply With Quote
Old 01-30-2004, 03:11 AM   PM User | #4
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
Thanks...

Hi Guys,

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

Thank you once again.

Regards,
Alex Chan
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 02-01-2004, 11:31 PM   PM User | #5
M@rco
Regular Coder

 
Join Date: Oct 2003
Location: London, UK
Posts: 411
Thanks: 0
Thanked 1 Time in 1 Post
M@rco is an unknown quantity at this point
Re: How to update graphics dynamically?

Quote:
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?
__________________
Marcus Tucker / www / blog
Web Analyst Programmer / Voted SPF "ASP Guru"
M@rco is offline   Reply With Quote
Old 02-02-2004, 02:26 PM   PM User | #6
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
Replies

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
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 02-02-2004, 03:47 PM   PM User | #7
M@rco
Regular Coder

 
Join Date: Oct 2003
Location: London, UK
Posts: 411
Thanks: 0
Thanked 1 Time in 1 Post
M@rco is an unknown quantity at this point
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...

__________________
Marcus Tucker / www / blog
Web Analyst Programmer / Voted SPF "ASP Guru"
M@rco is offline   Reply With Quote
Old 02-02-2004, 03:49 PM   PM User | #8
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
May I know how can i do it asynchronously? I am doing on each recipent basis.

Regards,
Alex Chan
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 02-02-2004, 03:55 PM   PM User | #9
M@rco
Regular Coder

 
Join Date: Oct 2003
Location: London, UK
Posts: 411
Thanks: 0
Thanked 1 Time in 1 Post
M@rco is an unknown quantity at this point
That all depends!

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

__________________
Marcus Tucker / www / blog
Web Analyst Programmer / Voted SPF "ASP Guru"
M@rco is offline   Reply With Quote
Old 02-02-2004, 03:58 PM   PM User | #10
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
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.
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 02-02-2004, 04:14 PM   PM User | #11
M@rco
Regular Coder

 
Join Date: Oct 2003
Location: London, UK
Posts: 411
Thanks: 0
Thanked 1 Time in 1 Post
M@rco is an unknown quantity at this point
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/tech...uery_ID=229678

__________________
Marcus Tucker / www / blog
Web Analyst Programmer / Voted SPF "ASP Guru"
M@rco is offline   Reply With Quote
Old 02-03-2004, 10:08 AM   PM User | #12
alexccw
New Coder

 
Join Date: Jan 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
alexccw is an unknown quantity at this point
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
__________________
Regards,
Alex Chan
alexccw is offline   Reply With Quote
Old 02-03-2004, 10:25 AM   PM User | #13
M@rco
Regular Coder

 
Join Date: Oct 2003
Location: London, UK
Posts: 411
Thanks: 0
Thanked 1 Time in 1 Post
M@rco is an unknown quantity at this point
Quote:
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.

__________________
Marcus Tucker / www / blog
Web Analyst Programmer / Voted SPF "ASP Guru"
M@rco is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:43 PM.


Advertisement
Log in to turn off these ads.