Reading Session value from WebServer which processing the aspx page

Discussion in 'ASP .Net Web Services' started by Avishesh, Aug 28, 2003.

  1. Avishesh

    Avishesh Guest

    Hi

    I'm developing a simple progress bar that display the
    value for the task completed.

    It has following files
    1. A "StartTask.aspx" file that has a command
    button "Start". When user clicks on this button, the file
    is submitted to ASP.NET and the process goes through the
    loop from 1 to 1000000. In every 10000th Counter, it
    updates the session
    variable "CurrentValue"=CurrentCounterValue (in this case
    it will be 10000, 20000, 30000 etc) and fire the
    Thread.Sleep(0) so that other waiting process can be run.

    After it reaches 1000000, IT AGAIN GOES THROUGH ANOTHER
    LOOP FOR 1 to 10000 and update the value of "CurrentValue"
    in every 1000th count.

    Once this small loop is completed, it goes through another
    loop for 1 to 100000 and updates the value of
    the "CurrentValue" once it is completed. The it returns
    the page to the browser.

    2. A Webservice file (Progress.asmx) with web
    method "getCurrentValue()" that returns the value of the
    session object(!) "CurrentValue".

    3. A HTML file (Progress.html) that call the
    webmethod "getCurrentValue()" in every 1000ms. I'm
    using "WebService Behaviour" to call the webmethod without
    refreshing the html file.

    ===Problem===
    When user clicks on the "Start" command button, it opens a
    new window with the "Progress.html" file and submits
    the "StartTask.aspx" file also.

    As the StartTask processed, obviously it updates the value
    for "CurrentValue" in every 10000th count. BUT value
    of "CurrentValue" is updated in the "Progress.html" ONLY
    WHEN the process of the "StartTask.aspx" is completed.

    So, my question is how to run these task simultaneously so
    that I can get the updates in the "Progress.html" when the
    value of the session "CurrentValue" is changed by
    the "StartTask.aspx" (AND BEFORE COMPLETION OF PROCESSING
    OF THE StartTask.aspx page!!!).

    I also tried changing [Thread.Sleep(0) to Thread.Sleep
    (3000)] in the "StartTask.aspx" and also by increasing
    value of [ maxconnection="20" ] in the web.config file.
    But these don't solve the problem!

    Can anyone please help me to solve this problem!

    Cheers'

    -avi
    Avishesh, Aug 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    953
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,076
    Matt Morris
    Jan 23, 2004
  3. John M
    Replies:
    1
    Views:
    1,108
    Kumar Reddi
    May 29, 2005
  4. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    538
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  5. diya
    Replies:
    2
    Views:
    336
    jcsnippets.atspace.com
    Apr 21, 2006
Loading...

Share This Page