// GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.DustinCreatedThisValue = "Hello MVC";
            return(View(cars));
        }
Esempio n. 2
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.HelloWorld = "Hello World";// This is the second way to render "Hello World" on the Index.cshtml view
            return(View(cars));
        }
Esempio n. 3
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.myValue = "Hello MVC";
            return(View(cars));
        }
Esempio n. 4
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();           // to get the cars

            ViewBag.AntoCreateThisValue = "Hello MVC"; // inline

            return(View(cars));
        }
Esempio n. 5
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.MainHeadline = "Main Headline";

            return(View(cars));
        }
Esempio n. 6
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            return(View(cars));
        }