Skip to content

Blazor is a .NET web framework that allows you to run C# code in your browser. You can use it to build a file manager, which is a tool that allows users to create, organize, and delete files and directories on a computer. To build a file manager using Blazor, you can start by creating a new Blazor project and adding a list of files and directories

Notifications You must be signed in to change notification settings

saskw2010/BlazorUsersRolesamazing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blazor Users Roles Amazing

##Mostafa Elnagar

#Good solution in razor pages authorizeview Razor Pages is a framework for building web applications with ASP.NET Core. It is based on the Model-View-Controller (MVC) pattern, and provides a convenient way to build web pages that display data, accept input, and perform logic. Razor pages authorizeview is a Razor component that can be used to display content based on the user's authorization status.

One way to use the AuthorizeView component in Razor pages is to wrap it around the content that you want to protect. For example:

@using Microsoft.AspNetCore.Authorization
 
 @page

 @attribute [Authorize]

 <AuthorizeView>
    <Authorized>
         <h1>Welcome!</h1>
         <p>You are logged in and have access to this content.</p>
    </Authorized>
    <NotAuthorized>
        <h1>Sorry</h1>
         <p>You are not logged in and do not have access to this content.</p>
    </NotAuthorized>
 </AuthorizeView>

This will display the "Welcome!" message to users who are logged in, and the "Sorry" message to users who are not logged in. You can also use the Policy attribute to specify which users have access to the content, based on their claims or roles.

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
Loading

This expression uses \$ to display a dollar sign: $\sqrt{$4}$

About

Blazor is a .NET web framework that allows you to run C# code in your browser. You can use it to build a file manager, which is a tool that allows users to create, organize, and delete files and directories on a computer. To build a file manager using Blazor, you can start by creating a new Blazor project and adding a list of files and directories

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published