From 3792436128d926c4e2b23bead9b74bf12d52f693 Mon Sep 17 00:00:00 2001 From: Alexander Usov Date: Sat, 1 Nov 2025 17:45:51 +0300 Subject: [PATCH 1/5] Update call-javascript-from-dotnet.md Changed the name of the handleTickerChanged1 function to displayTickerAlert1. Because in the code examples this function is called displayTickerAlert1. --- .../call-javascript-from-dotnet.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md index d38230d405fa..1eef8af54762 100644 --- a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md +++ b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md @@ -132,7 +132,10 @@ Provide a `displayTickerAlert1` JS function. The function is called with when selecting a button (**`Set Stock`**). +* The JS function takes two strictly typed on the C# side parameters — a string and a decimal, and then displays a modal alert box with a specified message. :::moniker range=">= aspnetcore-9.0" @@ -222,7 +225,7 @@ Provide a `displayTickerAlert1` JS function. The function is called with Date: Sun, 2 Nov 2025 05:44:57 -0500 Subject: [PATCH 2/5] Revise examples and update date in documentation --- .../call-javascript-from-dotnet.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md index 1eef8af54762..c897f3f419e4 100644 --- a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md +++ b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md @@ -5,7 +5,7 @@ description: Learn how to invoke JavaScript functions from .NET methods in Blazo monikerRange: '>= aspnetcore-3.1' ms.author: wpickett ms.custom: mvc, sfi-ropc-nochange -ms.date: 4/10/2024 +ms.date: 11/02/2025 uid: blazor/js-interop/call-javascript-from-dotnet --- # Call JavaScript functions from .NET methods in ASP.NET Core Blazor @@ -134,8 +134,8 @@ Provide a `displayTickerAlert1` JS function. The function is called with when selecting a button (**`Set Stock`**). -* The JS function takes two strictly typed on the C# side parameters — a string and a decimal, and then displays a modal alert box with a specified message. +* Invokes the `displayTickerAlert1` JS function with with two JSON-serializable parameters, a string in `stockSymbol` and a decimal in `price`, when selecting a button (**`Set Stock`**). +* The JS function receives the two arguments in strictly-typed parameters and displays a modal alert box with a specified message. :::moniker range=">= aspnetcore-9.0" @@ -299,7 +299,7 @@ Provide a `displayTickerAlert2` JS function. The following example returns a str ### Component (`.razor`) example (`InvokeAsync`) -`TickerChanged` calls the `handleTickerChanged2` method and displays the returned string in the following component. +`TickerChanged` calls the `displayTickerChanged2` method and displays the returned string in the following component. :::moniker range=">= aspnetcore-9.0" @@ -389,7 +389,7 @@ Provide a `displayTickerAlert2` JS function. The following example returns a str :::moniker-end -`TickerChanged` calls the `handleTickerChanged2` method and displays the returned string in the following component. +`TickerChanged` calls the `displayTickerChanged2` method and displays the returned string in the following component. :::moniker range=">= aspnetcore-9.0" From e656b54dd61e70d7c897869e86d8974c5ba18c24 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:14:21 -0500 Subject: [PATCH 3/5] Updates --- .../call-javascript-from-dotnet.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md index c897f3f419e4..2662c23daa2b 100644 --- a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md +++ b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md @@ -299,7 +299,10 @@ Provide a `displayTickerAlert2` JS function. The following example returns a str ### Component (`.razor`) example (`InvokeAsync`) -`TickerChanged` calls the `displayTickerChanged2` method and displays the returned string in the following component. +The following component: + +* Invokes the `displayTickerAlert2` JS function with with two JSON-serializable parameters, a string in `stockSymbol` and a decimal in `price`, when selecting a button (**`Set Stock`**). +* The JS function receives the two arguments in strictly-typed parameters and displays a modal alert box with a specified message. :::moniker range=">= aspnetcore-9.0" From 7a22056442b71778ad93a885de44b5429cba6b06 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:15:32 -0500 Subject: [PATCH 4/5] Updates --- .../javascript-interoperability/call-javascript-from-dotnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md index 2662c23daa2b..0f1ce58dee2a 100644 --- a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md +++ b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md @@ -301,7 +301,7 @@ Provide a `displayTickerAlert2` JS function. The following example returns a str The following component: -* Invokes the `displayTickerAlert2` JS function with with two JSON-serializable parameters, a string in `stockSymbol` and a decimal in `price`, when selecting a button (**`Set Stock`**). +* Invokes the `displayTickerAlert2` JS function with with two JSON-serializable parameters, a string in `stockSymbol` and a decimal in `price`, when selecting a button (**`Set Stock`**). * The JS function receives the two arguments in strictly-typed parameters and displays a modal alert box with a specified message. :::moniker range=">= aspnetcore-9.0" From c686b08cee95eb27919243f9c5693c2895e19ad8 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:17:44 -0500 Subject: [PATCH 5/5] Updates --- .../javascript-interoperability/call-javascript-from-dotnet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md index 0f1ce58dee2a..98d9ec752d6b 100644 --- a/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md +++ b/aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md @@ -392,7 +392,7 @@ The following component: :::moniker-end -`TickerChanged` calls the `displayTickerChanged2` method and displays the returned string in the following component. +`TickerChanged` calls the `displayTickerAlert2` method and displays the returned string in the following component. :::moniker range=">= aspnetcore-9.0"