How to do data sorting and filtering at the same time?
I have a code like this
I have a code like this
I am using Asp.Net .Net5 with Entity framework 5
I am attempting to use partial views for the first time and I need some help. I am posting a string from Javascript to my ASP controller so that I can query my database using that string. Like so:
I am developing a Razor application and I need the Admin to assign or update roles of the Users. I am using a checkbox to carry out this action. So far, I have been able to populate the view to show the users and their respective roles ticked in the checkbox, but I haven’t been able to update their roles, as anytime a checkbox is ticked to add a role, it doesn’t add the role to the user. I think this line is the culprit: var selectedRoles = model.Where(x => x.Selected).Select(y => y.RoleName);.
The code gives 401 Unauthorized response when I send a request without JWT token. everything looks good up to this point.
I am new to ASP and I am trying to take a string in my JS code and post it to my controller so that I can use it to query my database.
I beginner in .NET , I learn to follow tutorial but I Have this Message error when run program
I’m trying to access the user Id from the token but everything I try returns null. The generated token has the necessary information so I don’t think it’s the token generation.
Im trying to make an admin page where if i click on the button ‘send’, the message will be sent and there will popup a bootstrap alert on the employee page.
I have already the bootstrap alert setup, the message for the first time is shown. After I close and i send a message again i dont see any alert. I think it needs to be triggered when i click on the send button but im struggling about how to do that. Hope anyone can show me a simple way.
Here is the code for the admin page to send:
I have created 2 DbContexts for a new ASP.Net Core app.