How to Load a Web Page inside Blazor Tab Component?
This article explains how to render a website inside the Blazor Tab component.
- Create a Blazor application with Tab component referring to getting started with blazor tab component documentation.
- Now, add the below code in ~/Pages/Index.razor page with the website URLs in the Tab component.
<SfTab> <TabItems> <TabItem> <ChildContent> <TabHeader Text="Tab1"></TabHeader> </ChildContent> <ContentTemplate> <div> <iframe width="560" height="315" src=https://blazor.net frameborder="0" allowfullscreen></iframe> </div> </ContentTemplate> </TabItem> <TabItem> <ChildContent> <TabHeader Text="Tab2"></TabHeader> </ChildContent> <ContentTemplate> <div> <object data="https://www.youtube.com/embed/cQZYzOlTm0Q" width="400" height="300"></object> </div> </ContentTemplate> </TabItem> <TabItem> <ChildContent> <TabHeader Text="Tab3"></TabHeader> </ChildContent> <ContentTemplate> <div> <embed type="text/html" src="https://www.google.com/webhp?igu=1" width="500" height="400"> </div> </ContentTemplate> </TabItem> </TabItems> </SfTab>
- Wed pages can be opened using the different HTML elements like iframe, object, embed inside the ContentTemplate tag of the Tab component. Ensure the link is valid to load the web site.
Conclusion
I hope you enjoyed learning how to load a Web Page inside Blazor Tab Component
You can refer to our Blazor Tab feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Blazor Tab example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!