• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Need to get web front end displayed before processing is performed.

I have an asp.net/c# web app. The page renders through the Page_load event, and then c# classes are called and processing is performed.

High intensive processing is performed immediately in backend which sometimes can take up too 5 mins. possibly even longer. The front end to the web page does not appear until this processing is complete. Ideally I need the front end displayed then the processing performed. Can anybody assist with which method i can use to do this. can i use a thread or timer or something. Any assistance would be greatly appreciated.

Below is code example: Is there a place that I can put the Filewatcher call outside the page_load event  and still get it executed.

Something along the lines of a postrender event or something like that.

Thanks you.
protected void Page_Load(object sender, EventArgs e)
    {
        FileWatcher myFileWatcher = new FileWatcher();
        myFileWatcher.CheckForFiles();   
    }

Open in new window

0
metta0_3
Asked:
metta0_3
  • 2
  • 2
1 Solution
 
CB_ThirumalaiCommented:
What will be the intention of the long process?  Do you want to show any output in the Web UI after the process is complete?
0
 
metta0_3Author Commented:
I do want to show the results in the UI after. This has all been completed. i just need to render the UI first then execute method calls after. Thats all. nothing else.
0
 
sunithnairCommented:
Try Asynchronous Pages(http://msdn.microsoft.com/en-gb/magazine/cc163725.aspx) or

imports System.Threading
Thread obj = new Thread(new ThreadStart(<function name with return type of VOID>));
obj.IsBackground = true;
0
 
CB_ThirumalaiCommented:
You can use AJAX and as soon as you load the page and use web service
http://www.asp.net/ajax/documentation/live/tutorials/ExposingWebServicesToAJAXTutorial.aspx
0
 
metta0_3Author Commented:
Perfect solution. Was able to use this answer. much appreciated with quick response. Thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now