Quantcast
Channel: Setting a startup page in Blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by PeteBal for Setting a startup page in Blazor

$
0
0

Here's what we ended up doing (for better or worse)...We found through numerous tests that the following line of code in the cshtml file was causing one of the errors:

@inject Microsoft.AspNetCore.Blazor.Services.WebAssemblyUriHelper UriHelper

After deleting this line we fixed the other error by changing:This =

// Create list of clientsList<Clients> clientList = new List<Clients>();

to This =

// Create list of clientsList<CWBlah.Shared.Models.Clients> clientList = new `List<CWBlah.Shared.Models.Clients>();`

So, it appears it's a scoping issue, though i can't clearly understand why. When i add the @using directive to the top of the page the code doesn't seem to 'listen' to that directive. I would expect that the @using CWBlah.Shared.Models would allow me to just use Clients instead of scoping the entire variable.we ended up not doing the redirect, but ended up putting all of our 'Dashboard' logic into the 'Index.cshtml'.


Viewing all articles
Browse latest Browse all 5

Trending Articles



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