public ActionResult Create(FormCollection collection) { try { AESDataService.Question question = new AESDataService.Question(); using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient()) { question.theQuestion = Request.Form["theQuestion"]; question.theAnswer = Request.Form["theAnswer"]; client.updateQuestion(question); } return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(FormCollection collection) { try { AESDataService.Question question = new AESDataService.Question(); using (AESDataService.DataServiceClient client = new AESDataService.DataServiceClient()) { question.theQuestion = Request.Form["theQuestion"]; question.theAnswer = Request.Form["theAnswer"]; client.updateQuestion(question); } return RedirectToAction("Index"); } catch { return View(); } }