Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Conditional Layouts based on Parameter

$
0
0

I would like my .razor page to have the Default Layout (MainLayout) unless the LayoutType parameter is == "Tab" I am always getting the TabLayout. The default layout is MainLayout.

@page "/WasteNum/{LayoutType}"@if (LayoutType == "Tab"){    @layout TabLayout }@code {    [Parameter]    public string LayoutType { get; set; } = "Main";}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>