Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: Showing Progress in a ASP.NET App
BrianGorbett

From: Cleveland, OH USA
Posts: 5
Member Since: 12/08/02
posted March 11, 2003 9:50 AM

Is there a way to show the progress of retrieving messages in an ASP.NET application (VB.NET)? I was following the example in the PowerTCP documentation, but realized it was for Windows Forms.

I really would just like to trigger an event so that I know it is done getting messages to change the visibility of a control.

Thanks in advance.

bg
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted March 12, 2003 12:29 PM

Yes, you can display progress information in ASP.NET. However, it requires some knowledge of DHTML.

What to do:
1) When page loads, create an HTML progress bar (using a DIV object, for example).
2) Start a server side process which takes a long time to complete (for example, retrieving mail).
3) As progress information is available, write and flush some DHTML to the browser to increment the DIV object (making it look like it is "moving").
4) When the process is complete, take some action.

By doing this, you end up with a single long HTTP response to the HTTP request.

A live sample of this can be viewed at http://samples.dart.com/progressdemo/webform1.aspx

You can also download the source for this sample at http://samples.dart.com/downloads/progressdemo.zip

Note this sample DOES NOT demonstrate interaction with a PowerTCP component. To display real time progress for a PowerTCP component (for example the Mail for .NET component to display progress while getting mail or the PowerTCP FTP for .NET component to display progress while transferring files) you must replace the "phony" progress mechanism in the sample with the Progress event of whatever product you are using.

Finally, I haven't actually answered your question yet. You wanted to simply enable/disable form elements. You could use the basic theory above to do this though. For example:

1) Click a button to begin a file transfer. In the CLIENT-SIDE onClick event disable the button.
2) Transfer the file.
3) When complete, reenable the button.

Hope this helps.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted March 12, 2003 12:31 PM

Oh yeah, one other thing. This sample demonstration is compatible with IE 5.0+ only. It can be made compatible with Netscape and other browsers, however.
BrianGorbett

From: Cleveland, OH USA
Posts: 5
Member Since: 12/08/02
posted March 12, 2003 6:43 PM

Thanks for the suggestions! This forum really makes the value of these components that much better.

bg
Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX