[training]Getting Started with ASP.NET MVC 5 – Adding a View

>Razor code comment symbol @*…….*@

>A controller class is where you write the code that handles incoming browser requests, retrieves data from a database, and ultimately decides what type of response to send back to the browser.

>A view template should never perform business logic or interact with a database directly. Instead, a view template should work only with the data that’s provided to it by the controller. Maintaining this “separation of concerns” helps keep your code clean, testable and more maintainable.

>Currently, it’s all done through the Controller(through the URL)傳遞資料給View(畫面呈現)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.