Skip to content

Use the WebMethod attribute to get information about the current progress from the server and display it on the client without refreshing the whole page. To enable this functionality, use the jQuery library or ScriptManager page.

License

DevExpress-Examples/asp-net-web-forms-progress-bar-display-server-process-progress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Progress Bar for ASP.NET Web Forms - How to use the WebMethod attribute to display the progress of a server-side process on the client

This example demonstrates how to use the WebMethod attribute to get information about the current progress from the server and display it on the client without refreshing the whole page. To enable this functionality, use the jQuery library or ScriptManager page.

Use WebMethods to display the server-side process

Overview

Add the WebMethods attribute to the BasePage class as follows:

[WebMethod(EnableSession = true)]

For the jQuery approach, send a POST request to the WebMethod:

function WebMethodRequest(url, callback) {
    $.ajax({
        url: url,
        type: "POST",
        contentType: 'application/json; charset=utf-8',
        success: callback
    });
}

For the ScriptManager technique, call the StartOperation method:

function callbackStart(s, e) {
    // ...
    PageMethods.StartOperation();
    // ...
}

Files to Review

Documentation

More Examples

About

Use the WebMethod attribute to get information about the current progress from the server and display it on the client without refreshing the whole page. To enable this functionality, use the jQuery library or ScriptManager page.

Topics

Resources

License

Stars

Watchers

Forks