public ActionResult WordCounter(WordCountTool model) { if (ModelState.IsValid) { var wc = new WordCount(); wc.Input = model.UserInput; var we = new WordEnumerator(); model.Count = we.CountWords(wc); return View(model); } return View("WordCounter", model); }
//*************Level 3 Labs*************** public ActionResult WordCounter() { var model = new WordCountTool(); return View(model); }