Skip to content

DevExpress-Examples/web-forms-display-progress-information-about-callback-process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASP.NET Web Forms - How to display progress information about server-side callback processing

This example illustrates how you can inform your users about a server-side process when an operation initiated by a callback request takes too much time.

In this example, a callback panel sends a request to the server and performs a long server process.

Another callback panel sends a callback to the server every timer tick. On the server, a callback event handler gets the current operation progress and returns this value to the client.

How to perform parallel callbacks

This approach does not work if the Session state is used. The Session state blocks parallel execution and forces parallel requests to be executed one after another because the access to the ASP.NET Session state is exclusive per session.

To avoid this issue, you can disable the Session state in the following ways:

  • At page level, set the EnableSessionState property to False:

    <%@ Page Language="C#" AutoEventWireup="true" Inherits="_Default" EnableSessionState="False" CodeFile="Default.aspx.cs" %>

    You can also set the page EnableSessionState property to ReadOnly. In this case, the Session state is enabled but not writable.

  • At project level, set the sessionState mode key to off in the Web.config file:

    <system.web>  
        <sessionState mode="Off"></sessionState>  
    </system.web>

Note that when the Session state is disabled, it is no longer possible to use Session variables. The states below can be used as alternatives:

  • Application state that stores variables that can be accessed by all users of an ASP.NET application.
  • Profile properties that persist user values in a data store without expiring them.
  • ASP.NET caching that stores values in memory available to all ASP.NET applications.
  • Cookies.
  • Query string that is available from an HTTP request.

Files to Review

Documentation

More Examples → [Add links to the related examples]