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

            ViewBag.DustinCreatedThisValue = "Hello MVC";
            return(View(cars));
        }
示例#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));
        }
示例#3
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

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

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

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

            ViewBag.MainHeadline = "Main Headline";

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

            return(View(cars));
        }