what's the render order when a user visit a page via browser?

Alick Wang 266 Reputation points
2022-12-27T14:27:40.817+00:00

.net core mvc

route->action->chtml?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,193 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zhi Lv - MSFT 32,016 Reputation points Microsoft Vendor
    2022-12-28T07:05:08.297+00:00

    Hi @Alick Wang ,

    Check the following screenshot, it is easier to understand the request processing in Asp.net core MVC.

    274522-image.png


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Dillion

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,771 Reputation points
    2022-12-27T16:30:08.72+00:00
    0 comments No comments

  2. Alick Wang 266 Reputation points
    2022-12-28T08:15:29.86+00:00

    Then when a user visit the url ,how to show a loading prompt in the browser first before the action finish query data from database.


  3. Bruce (SqlWork.com) 56,771 Reputation points
    2022-12-28T17:16:54.76+00:00

    Web pages are a request (url) and response (html). In mvc the view builds the response html and sends to the browser to display. The request can only return one response, say a loading page or the actual response.

    As suggested a loading prompt is usually done with JavaScript by catching the form submit event.