diff --git a/aspnetcore/blazor/components/event-handling.md b/aspnetcore/blazor/components/event-handling.md index 20aef0c16755..b58d31129c4f 100644 --- a/aspnetcore/blazor/components/event-handling.md +++ b/aspnetcore/blazor/components/event-handling.md @@ -40,6 +40,9 @@ For event handling: :::moniker-end +> [!IMPORTANT] +> The Blazor framework doesn't track `void`-returning asynchronous methods (`async`). As a result, the entire process fails when an exception isn't caught if `void` is returned. Always return a / from asynchronous methods. + The following code: * Calls the `UpdateHeading` method when the button is selected in the UI. diff --git a/aspnetcore/blazor/components/index.md b/aspnetcore/blazor/components/index.md index 79319ee4c515..4a10bde23119 100644 --- a/aspnetcore/blazor/components/index.md +++ b/aspnetcore/blazor/components/index.md @@ -638,7 +638,7 @@ Razor syntax for C# control structures, directives, and directive attributes are ### Asynchronous methods (`async`) don't support returning `void` -The Blazor framework doesn't track `void`-returning asynchronous methods (`async`). As a result, exceptions aren't caught if `void` is returned. Always return a from asynchronous methods. +The Blazor framework doesn't track `void`-returning asynchronous methods (`async`). As a result, the entire process fails when an exception isn't caught if `void` is returned. Always return a / from asynchronous methods. ### Nested components