Lab Practice Problems for ASP.NET MVC for absolute beginners.
- Create a new Controller named “Friend”.
- Create a Model named “Friend” with the following properties : FriendID, FriendName, Place.
- Create an Index (List of Friends) View and Method in "Friend" Controller.
- Update your Model "Friend" for validation.
- Make FriendID as Required attribute.
- Make FriendName as Error Message = Friend Name Empty Not Allowed.
- Make Place for entry and restrict it to Maximum Character = 25.
- Create an Insert new friend --> View and Method in "Friend" Controller.
- Insert new record with using Model in post.
- Before Inserting, check your Model means validate your Model.
- Create Edit/Update View and Method in Controller.
- Update record, using FormCollection technique.
- Create Delete View and Method for deleting a friend in POST method of Controller.
Perform all of the above CRUD (Create Retrieve Update Delete) activities in the following ways:
- ADO.NET Code
- Linq To SQL