using System.Collections.Generic;
namespace HelloWorldMvcApp
public class HomeController : Controller
public ActionResult Index()
MurphyModel model = new MurphyModel();
public ActionResult Index(MurphyModel model)
var splitEmails = model.EmailList.Split(',');
var anEmail = "These are the different emails: ";
foreach (string email in splitEmails)
anEmail+= email + " and ";
anEmail = anEmail.Substring(0, anEmail.Length - 5);
ViewBag.Output = anEmail;