Lab Practice Questions In ASP.NET MVC

Lab Practice Problems for ASP.NET MVC for absolute beginners.

  1. Create a new Controller named “Friend”.
  2. Create a Model named “Friend” with the following properties : FriendID, FriendName, Place.
  3. Create an Index (List of Friends) View and Method in "Friend" Controller.



  4. Update your Model "Friend" for validation.
  5. Make FriendID as Required attribute.
  6. Make FriendName as Error Message = Friend Name Empty Not Allowed.
  7. Make Place for entry and restrict it to Maximum Character = 25.
  8. Create an Insert new friend --> View and Method in "Friend" Controller.



  9. Insert new record with using Model in post.
  10. Before Inserting, check your Model means validate your Model.
  11. Create Edit/Update View and Method in Controller.
  12. Update record, using FormCollection technique.



  13. 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:

  1. ADO.NET Code
  2. Linq To SQL