@model String
- lowcase define the type of data coming into the view.
- model give us access to data passed into our view from a controller.
- uppercase accesses the model data passed into the view.
- controller send data to view.
controller
- namespace
- class
- method return IactionResult are called action method provided responses usable by browser.
Routing
- How do Routes Map Up with Controllers?
- By default,the first section of the route maps up to the controller of the same name,and the second section maps up to an action within that cotroller of the same name.
- When we dont have the route part of url, asp.net mvc will use a default route.
Model
- Create a class including members and some functions.
Getting user Input
- steps to the solution that user use input.
- Create from in a view.
- Add Create() method to controller.
- Move existing logic out of the Index() into Create()
Retaining Data
- We should use either an array or list to handle our group of characters.
- Adding new object to an array.
- Adding a new object to a list.
- List let us more than one obj
本文详细介绍了 ASP.NET MVC 的工作原理,包括路由映射、控制器如何与视图交互、模型绑定等内容,并探讨了如何在应用中创建和管理数据。
988

被折叠的 条评论
为什么被折叠?



