public ActionResult DonationDetails(int id) { try { Tbl_Donation donation = db.Tbl_Donation.Find(id); return View(donation); } catch(Exception e) { return View(e.Message); } }
public ActionResult Donation1(Tbl_Donation donation) { if (ModelState.IsValid) { try { db.Tbl_Donation.Add(donation); db.SaveChanges(); TempData["DonationMessage"] = "Thank you for your Donation"; } catch (Exception e) { Response.Write(e.Message); } return(View("GLOBAL")); } else { return(View()); } }