Skip to main content
All docs
V25.1
  • IToastNotificationService.ShowToast(String) Method

    Shows a toast notification declared in markup with the specified identifier.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    void ShowToast(
        string id
    )

    Parameters

    Name Type Description
    id String

    The toast unique identifier (Id).

    Remarks

    Call this ShowToast method overload to show a toast declared in markup.

    <DxButton Text="Show toast" Click="ShowDeclaredToast" />
    <DxToastProvider />
    
    <DxToast Id="toast1" Text="The toast specified in markup." />
    
    @code {
        [Inject] IToastNotificationService ToastService { get; set; }
    
        private void ShowDeclaredToast() {
            ToastService.ShowToast("toast1");
        }
    }
    
    See Also