public ActionResult About() { var Model = new AboutModels(); ViewBag.Message = "Your application description page."; Model.Location = "Tallinn, EESTI"; return(View(Model)); }
public ActionResult About() { var modelAbout = new AboutModels(); modelAbout.Name = "Manas"; modelAbout.Location = "Mysore,India"; //ViewBag.Message = "Your application description page."; //ViewBag.Location = "Mysore,India"; return(View(modelAbout)); }
public ActionResult About() { ViewBag.Message = "Your application description page."; var Model = new AboutModels(); Model.Name = "Kristo"; Model.Location = "Tallinn, Estonia"; Model.Age = 17; return(View(Model)); }
public ActionResult About() { ViewBag.Message = "Your application description page."; ViewBag.Author = "Moni Holasz"; var viewModel = new AboutModels { Author = "Moni Holasz", Message = " this is my about page" }; return(View(viewModel)); }
public ActionResult About() { //ViewBag.Message = "Your application description page."; //ViewBag.Location = "London, England"; var model = new AboutModels(); model.Name = "Ode To Food"; model.Location = "London Town, UK"; return(View(model)); }
public ActionResult About() { ViewBag.Message = "Your application description page."; var r = new Random(); if (r.Next() % 3 == 0) { var c = new AboutModels(); c.saySomething(); } return(View()); }
public ActionResult About() { //mystrings.Clear(); //mystrings.Add(new Search() { query = "Hi I'm JabberJaw" }); //This is the first use of .Name i made it up but it doesn't really matter //you can put .anything and it creates the specific type of data your retrieving ViewBag.Name = "Brandon"; //you can also use a model by making a new instance of one and thus asccessing its properties var model = new AboutModels(); model.Age = 21; model.Height = 5.4; return(View(model)); }