Пример #1
0
        public ActionResult MyFirstViewMethod()
        {
            CustomerBAL b = new CustomerBAL();
            Customer c = b.GetCustomer();
            ViewBag.CustomerData = c;

            string custName = "john doe";
            ViewData["MyData"] = custName;
            //ViewBag.MyData = custName;
            return View("MyFirstView2");
        }
Пример #2
0
        public ActionResult Index()
        {
            CustomerBAL b = new CustomerBAL();
            Customer c = b.GetCustomer();
            Customer d = new Customer();
            d.CustomerName = "alex";

            List<Customer> customers = new List<Customer>();
            customers.Add(c);
            customers.Add(d);
               // return View(customers);
            return View();
        }