Show or hide navigation menu based on user role in asp net core

Show or hide navigation menu based on user role in asp net core

kudvenkat

4 года назад

89,814 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Thami Motloung
Thami Motloung - 14.03.2023 14:17

Thank you I am new in DOT Net and this really helped Alot. Thank you!!!!!

Ответить
khairul hisham
khairul hisham - 14.03.2023 06:01

great video sir, sir, if the menu we use is menu responsive from css@bootstrap, not the menu from visual studio provide, can we use this way also?

Ответить
khaled tarboosh
khaled tarboosh - 07.01.2023 10:42

Thank you very much .

Ответить
jgsk78
jgsk78 - 23.04.2022 18:28

I thought we provide different content and links through different layouts that are set through if conditions in _ViewStart ... as in :
if (User.IsInRole("Admin"))
{
Layout = "_AdminLayout";
}

....etc

Ответить
Anil
Anil - 30.01.2022 15:04

Tq

Ответить
Amir Kian
Amir Kian - 17.12.2021 10:52

where the user comes from in layout view?!

Ответить
no one
no one - 26.09.2021 20:14

you are a professional teacher thanks a lot

Ответить
R.O.
R.O. - 06.03.2021 02:20

I just want to thank you for this video series, you helped me a lot!

Ответить
s zafar
s zafar - 22.12.2020 00:18

do you have any videos that will allow me to add hyperlinks to the razor page from the controller class

Ответить
Jitendra Kumar
Jitendra Kumar - 10.08.2020 06:59

Can anyone tell me how to implement global logout in .net core 3.1?

Ответить
Olabisi Olaoye
Olabisi Olaoye - 21.07.2020 00:10

Thank you so much for this video. It was incredibly helpful.

Ответить
kunal Singh
kunal Singh - 18.07.2020 20:20

Sir your all topics is unique and very helpful thanks for uploading and supporting

Ответить
7Andy77
7Andy77 - 26.04.2020 23:58

I have a problem. When I set the [Authorize(Roles = "Admin")] for AdministrationController, no matter what Role do I have, it always takes me to LogIn page (Account/Login?ReturnUrl=%2FAdministration%2FListRoles). I saw a solution to make custom decoration for role authorization, however, I would like to make it work the normal way, with [Authorize(Roles = "Admin")]. Does anyone managed to solve this?

Ответить
Saicharan Namada
Saicharan Namada - 08.04.2020 08:53

Hi everyone.. A small query, if access is denied then it could have gone to other controller, why only the account controller..please help me out to understand that..

Ответить
Flo Aguirre
Flo Aguirre - 30.03.2020 01:51

For the role process to work, the process model has to be out of process

Ответить
Anand Seniyar
Anand Seniyar - 29.03.2020 14:41

I have a user is Admin Role, cant get access to Administration page(redirects to Access Denied page) and razor page link is hidden when Authorization attribute is applied. Tried logout and login, cleared cache and checked database everything looks fine. Can someone help?

Ответить
Meliton Valero
Meliton Valero - 25.03.2020 12:35

Got this error: "The type or namespace name 'SignInManager<>' could not be found (are you missing a using directive or an assembly reference?) [MDPWeb]csharp(CS0246)" and " The type or namespace name 'ApplicationUser' could not be found (are you missing a using directive or an assembly reference?) [MDPWeb]csharp(CS0246)" Im using Visual Studio Code .

Ответить