I have _LayoutOnecs.html file and View Loads with in it renderbody and displays list of records in table. in one of table column i have a Delete icon on click of it goes to controller and deletes record from database once the record is deleted the view should be refreshed so i returned the action to controller which fetches all the records
public ActionResult GetAdvertisementDetails() { var advertisementList = new AdvertisementManager().GetAdvertisementDetails(); return View("AdvertisementDetails", advertisementList); } public ActionResult DeleteAdvertisementDetails(int id) { new AdvertisementManager().DeleteAdvertisementDetails(id); return RedirectToAction("GetAdvertisementDetails", "Advertisement"); }
once Delete is done it is going to GetAdvertisementcontroller and return view but the Deleted record sits there in table if i Refresh the page by pressing F5 the record is removed from table. How do i Refresh automatically when the record is deleted
Thanks