Blazor and JavaScript Interoperability

Offered By
Coursera Project Network
In this Guided Project, you will:

Invoke JavaScript functions from .NET code

Invoke .NET methods from JavaScript code

Build browser API interactions in Blazor

Clock1 hour
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this short project-based course, you will learn how to extend your Blazor applications to communicate with JavaScript - the browser's first class language. You'll learn how to invoke JavaScript functions from .NET code, and how to invoke .NET methods from JavaScript. You'll also implement a solution for accessing the browser's localStorage with a .NET service class. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

Web Applicationblazor

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Create a new Blazor app

  2. Adding JavaScript to Our App

  3. Trigger JavaScript Function from .NET

  4. Passing a Parameter to JavaScript

  5. .NET Objects as Parameters

  6. Returning Values to .NET

  7. Call .NET Methods from JavaScript

  8. Browser localStorage API Setup

  9. Saving Data to localStorage

  10. Reading Data from localStorage

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.