Results 1 to 5 of 5

Thread: Keep the user on a page that take long time to process.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    MA, US
    Posts
    78

    Keep the user on a page that take long time to process.

    Hi,
    I must build a page that will enable users to check the status of some accounts online. The current status can be retrieved in minimum 15-20 sec. I need some Ideeas to make the page showing something during the wait time. All the processing is done by a stored procedure. I would like to do an asyncronous call to the stored procedure (if it is possible). How can I keep the user on the page, to do not go back and hit again.

    thank you,

    svatasoiu

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You can use threads. Spin up a second thread to do the processing, then when its done redirect the user to other page.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Location
    MA, US
    Posts
    78
    Hi,

    thank you for your answer.
    Do you know any place where I can see some examples.
    Until now I did not worked with treads.

    thank you,

    svatasoiu

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Do a search on www.google.com for VB.Net multithreading, or C# multithreading. You will get the info you need.

  5. #5
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    PHP Code:

    protected void btnProcess_Click(Object oEventArgs e)
    {
        
    // Create the thread object, passing in the DoLongProcessing method
        // using a ThreadStart delegate.
        
    Thread processingThread = new Thread(new ThreadStart(this.DoLongProcessing));

        
    //Start the thread
        
    processingThread.Start();
    }


    //Function to do processing
    void DoLongProcessing()
    {
        
    //Do processing here...
        
        //After processing done
        //redirect user to accounts page.

        
    Response.Redirect("Accounts.aspx");

    Hope that helped.
    Dont gain the world and lose your soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width