The model class dropdown automatically displays the name of all the classes in the Model folder. Now, select Student from the model class dropdown. Select "List" template because we want to show the list of students in the view. Template dropdown will show default templates available for Create, Delete, Details, Edit, List, or Empty view. It's good practice to keep the view name the same as the action method name so that you don't have to explicitly specify the view name in the action method while returning the view. This will open the Add View dialogue box, shown below. The following creates a view from the Index() action method of the StudentContoller, as shown below. You can create a view for an action method directly from it by right clicking inside an action method and select Add View. Supports Visual Basic code with html tags.
0 Comments
Leave a Reply. |