예제 #1
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.DonnyvesCreatedThisValue = "Hello MVC";
            return(View(cars));
        }
예제 #2
0
        // GET: Home
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();  //gets access to the hellomodels.cs.

            ViewBag.DanCreatedThisValue = "Hello MVC";

            return(View(cars));  //view helper method.
        }
예제 #3
0
        public ActionResult Index()
        {
            var cars = HelloModel.GetCars();

            ViewBag.DanielCreatedThis = "Daniel Created this";

            return(View(cars));
        }
        // GET: Home
        public ActionResult Index()
        {
            ViewBag.SomeValue = "From the Action method!";

            var cars = HelloModel.GetCars();

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

            ViewBag.CJCreateThisValue = "Hello MVC World ";

            return(View(cars));
        }
        public ActionResult Index()                 //ASP.NET engine also looks for action result called 'Index'
        {
            ViewBag.Value = "This message is coming straight from the Action method";

            var cars = HelloModel.GetCars();        //Accesses the Model class

            return(View(cars));                     //Returns an instance of the list of cars to the view
        }
예제 #7
0
        // did anything change today? 09/05/17
        // processes requests for data, which template to use, redirects
        // GET: Home
        public ActionResult Index()
        {
            // ctrl. makes "using HelloMVC.Models;"
            var cars = HelloModel.GetCars();

            ViewBag.OliverCreatedThisValue = "~hello MVC~";
            // generate a view that will be
            // used by this actionresult method
            // this allows us to make a blank page
            return(View(cars));
        }