In simple terms
1. Say suppose you have a class
public class Student
{
public int Id { get; set; }
public string Name { get; set; }
}
2. You controller could be
public ActionResult Contact(Student student)
{
ViewBag.Message = "Your contact page.";
ViewBag.id = student.Id;
ViewBag.name = student.Name;
return View(student);
}
3. Your view could be
@model Mvc.Models.Student
YOUR ID = @Model.Id
YOUR NAME = @Model.Name