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

Blazor SectionOutlet and SectionContent within the same page

$
0
0

I want to use both Section-Components within the MainLayout.razor, but it does not work, and I presume, it's not possible. My code so far:

@inject ExampleService ExampleService<SectionContent SectionName="section-info"><span style="color:silver;">@_sectionInfo</span></SectionContent><div class="page"><div class="sidebar"><NavMenu /></div><main><AuthorizeView><Authorized><div class="top-row px-4" style="justify-content: space-between; z-index: 100;"><div style="justify-content: space-between; color: darkgray;text-align:start;"><SectionOutlet SectionName="section-info" /></div>...

Assuming user A can change a status on a special page within the blazor app, and the current status of the current user should be shown in the title of the app, in the MainLayout.razor. This is implemented and works like expected, any status change is shown immediately in the title. But other users can change the status for A as well, but how can be the value in the title of A be updated in this case? So I have implemented a Timer in MainLayout, it gets the current status of the current user and could show it in the title ... when it would work. It doesn't. Getting the value works well (same implementation like in the page), I think, the reason is like how the Section works.

The only alternative I could think of is to implement this timer in every page of my app, but ... I hope, there is another, better solution. Any ideas?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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