Skip to content

Commit

Permalink
Pull new sample code (#34386)
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex authored Dec 17, 2024
1 parent 39b8a68 commit d7187b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aspnetcore/blazor/includes/js-interop/js-collocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Add the following script after the Blazor script ([location of the Blazor start
@code {
private string? result;
public async void ShowPrompt()
public async Task ShowPrompt()
{
result = await JS.InvokeAsync<string>(
"showPrompt1", "What's your name?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to invoke .NET methods from JavaScript functions in Blazo
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.custom: mvc
ms.date: 11/12/2024
ms.date: 12/17/2024
uid: blazor/js-interop/call-dotnet-from-javascript
---
# Call .NET methods from JavaScript functions in ASP.NET Core Blazor
Expand Down Expand Up @@ -757,7 +757,7 @@ public class GenericType<TValue>
}

[JSInvokable]
public async void UpdateAsync(TValue newValue)
public async Task UpdateAsync(TValue newValue)
{
await Task.Yield();
Value = newValue;
Expand Down

0 comments on commit d7187b5

Please sign in to comment.