Пример #1
0
        public ActionResult DataPassing(Person aPerson)
        {
         //   ViewBag.Person = aPerson;

            //ViewBag.PersonName = name;
            //ViewBag.PersonAge = age;
            //ViewBag.Email = email;


            List<Person> persons = new List<Person>();

            Person p1 = new Person();
            p1.Name = "Sumi";

            Person p2 = new Person();
            p2.Name = "Sumi";


            persons.Add(p1);
            persons.Add(p2);

            return View(persons);
        }
Пример #2
0
 public string CreatePerson(Person aPerson)
 {
     return aPerson.Name + " " + aPerson.Email;
 }