public ActionResult ReversingAString(TwoWayString stringModel) { if (ModelState.IsValid) { var reverser = new StringReverser(); var text = new StringBothWays(); text.Original = stringModel.Forward; text = reverser.ReverseString(text); stringModel.Reversed = text.Backwards; return View("ReversingAString", stringModel); } return View("ReversingAString"); }
public ActionResult ReversingAString() { var model = new TwoWayString(); return View("ReversingAString", model); }