C
C#7mo ago
Robisca

ASP.NET MVC Way to handle a page

Hello, i'm trying to build a quiz and I don't know how to handle the quiz page itself. Is it better to handle the response from the user in controller and return a new view or is it better to handle the response in the Model of the view and update the view accordingly? Note that i use MVC and Razor pages. I don t use AJAX or Angular or anything else
2 Replies
Pobiega
Pobiega7mo ago
the "usual" approach would be to handle it in the controller, or a service/command handler/logic method called from the controller at least. You would then produce a new model based on the result of the above mentioned method and render an updated/new view
Robisca
RobiscaOP7mo ago
Thx <3
Want results from more Discord servers?
Add your server