AXED
I'm having a weird null reference issue with a Razor Pages view component.
I have a shared layout where I'm trying to pass either a student or teacher ID (or 0 if none) to a view component. Even though I'm explicitly handling null cases I keep getting a NullReferenceException.
Here's my layout code:
view component:
I keep getting:
in the layout
at the ternary operation in the layout. I've verified the ViewData values are indeed null. Any ideas what I'm missing? 🤔
1 replies