How do I embed a URL inside an iFrame in a Blazor application?

Platform: Blazor| Category: General

An <iframe> tag is known as an inline frame or frame within a frame. It’s an HTML element that allows documents to be embedded within the current page. The following example illustrates how to embed a URL inside an iframe in the Blazor Web App and Blazor WebAssembly Standalone App targeting .NET 8.0.

[Home.razor]

@page "/"

<iframe width="560" height="315" src="https://blazor.net" frameborder="0" allowfullscreen></iframe>

Blazor Web App – View Sample in GitHub

Blazor WebAssembly Standalone App – View Sample in GitHub

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.