Tuesday, March 15, 2011

processing page

how to show a processing page on load of certain data display page in asp.net.

From stackoverflow
  • I still like the classic 2 page solution. The first page has an BODY ONLOAD call that does "window.location = 'Page2.asp';". This results in the first page being displayed and the 2 page being invoked. While the second page is doing it's work the first page remains displayed.

    There are a couple of "problems" with this solution:

    • User clicking refreshing will not take them to the first page (they are on the second page, and clicking refresh will start the second page loading again).
    • This relies on the second page sending its results all at once (basically "buffered", which is the default).

    You could also do this with AJAX (all on one page):

    1. Display a waiting message
    2. Initiate the work with an AJAX load request
    3. Once the load is complete rebuild the page or head of to a "completed" page.

    AJAX is nice, except that it may hide any server side errors that occur (i.e. if the page crashes horribly). Also it depends on how you prefer to do ajax (jQuery vs ASP.NET Ajax vs X Y Z).

0 comments:

Post a Comment