Relative Content

Tag Archive for c#asp.net-mvc

Only json is returned in my Foody project

When I run my foody project and click on the categories on my web page, there is only json data on the displayed page. I want the recipe data to be in the cards. When I open the console, I get an error like this
Failed to load resource: the server responded with a status of 404 (Not Found)
:5229/api/dishes/GetDishesByCategory:1

ASP.NET Core MVC: Comment Replies Not Working After Refactoring

I am working on an ASP.NET Core MVC project that involves posts and comments. Users can leave comments on posts, and they can also reply to other comments. The initial implementation was working (Check this commit), but after some refactoring, the reply functionality stopped working. Now, when I try to reply to a comment, the page just refreshes without hitting the controller action.

Navigation to Index view using RedirectToAction does not work (C#)

While debugging the code, I see that the Edit action is performed, but the URL remains unchanged and there is no navigation to the new Index view. I also tried to handle the form submission via JavaScript, but after saving the Java Script code was not executed.