Edit on GitHub

In this document

The Message API is used to show a message to the user or to get a confirmation from the user.

By default, the Message API is implemented using sweetalert. To make sweetalert work, you should include its CSS & JavaScript files, then include abp.sweet-alert.js to your page.

Show message


abp.message.info('some info message', 'some optional title');
abp.message.success('some success message', 'some optional title');
abp.message.warn('some warning message', 'some optional title');
abp.message.error('some error message', 'some optional title');

A success message is shown below:

Success message using sweetalert



    'User admin will be deleted.',
    'Are you sure?',
    function (isConfirmed) {
        if (isConfirmed) {
            //...delete user

A confirmation message is shown below:

Confirmation message using sweetalert

ASP.NET Boilerplate internally uses the Message API. For example, it calls abp.message.error if an AJAX call fails.