public ActionResult Index() { var config = CodeInsideConfig.GetConfig(); ViewBag.Url = config.WebUrl; ViewBag.Id = config.Id; ViewBag.NumberOfAuthors = config.Authors.Count; return(View()); }
public ActionResult Index() { ViewData["Message"] = "Welcome to ASP.NET MVC!"; CodeInsideConfig config = CodeInsideConfig.GetConfig(); ViewData["webUrl"] = config.WebUrl; ViewData["startedOn"] = config.StartedOn; string authors = ""; foreach (CodeInsideConfigAuthor author in config.Authors) { authors += author.Name + ","; } ViewData["authors"] = authors; return(View()); }