File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
javascript-interoperability Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Add the following script after the Blazor script ([location of the Blazor start
5050@code {
5151 private string? result;
5252
53- public async void ShowPrompt()
53+ public async Task ShowPrompt()
5454 {
5555 result = await JS.InvokeAsync<string>(
5656 "showPrompt1", "What's your name?");
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: Learn how to invoke .NET methods from JavaScript functions in Blazo
55monikerRange : ' >= aspnetcore-3.1'
66ms.author : riande
77ms.custom : mvc
8- ms.date : 11/12 /2024
8+ ms.date : 12/17 /2024
99uid : blazor/js-interop/call-dotnet-from-javascript
1010---
1111# Call .NET methods from JavaScript functions in ASP.NET Core Blazor
@@ -757,7 +757,7 @@ public class GenericType<TValue>
757757 }
758758
759759 [JSInvokable ]
760- public async void UpdateAsync (TValue newValue )
760+ public async Task UpdateAsync (TValue newValue )
761761 {
762762 await Task .Yield ();
763763 Value = newValue ;
You can’t perform that action at this time.
0 commit comments