AspNetMVC
AspNetMVC
• ActionLink: • CheckBox
links to an action method • DropDownList
• EditTextBox
• Hidden
• ListBox
• Password
• RadioButton
• TextArea
• TextBox
Adding a View
• Right-click on View folder select Add View and configure view from
the resulting dialog.
• It’s easy to generate tables and lists that can be edited and posted back to
the controller to effect changes to its model.
• The HTML helpers on the previous page make building a view a fairly simple
process.
• The wizard for Strongly Typed views does most of the work in rendering
model details.
What is a Controller?
• A controller is a C# class that derives from the class
Controller.
• A controller defines some category of processing for the
application.
• Its methods define the processing details.
• Routing to a controller is defined in Startup.Configure
method.
Data Binding
• If a controller method takes a model class as a parameter, then the
MVC infrastructure will instantiate an instance and pass to the
controller method when requested via a url.