@attribute [Authorize(Roles = "Admin")]
@attribute [Authorize(Roles = NavigationManager.QueryString("level"))]
I have added this code on my page level, the first authorize attribute works fine, since it is just a constant value "Admin" but not the second authorize attribute.
I am trying to grant access based on the query string, but this code NavigationManager.QueryString("level")
will have this error
"An object reference is required for the nonstatic field, method, or property 'member'"
Is there anyway to fix this?