Skip to content

Commit d7187b5

Browse files
authored
Pull new sample code (#34386)
1 parent 39b8a68 commit d7187b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

aspnetcore/blazor/includes/js-interop/js-collocation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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?");

aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to invoke .NET methods from JavaScript functions in Blazo
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 11/12/2024
8+
ms.date: 12/17/2024
99
uid: 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;

0 commit comments

Comments
 (0)