i have child called "shipmentitemlist" and parent named "shipmentlist".
in my child table when i delete 1 row i need to redirect again in shipmenitemlist. the problem is didnot redirect to my child table.
this is my code..
- public ActionResult Delete(int id, ShipmentItemFormModel model)
- {
- var ShipmentId = _shipmentService.GetAll();
- if (model.Id > 0)
- {
- try
- {
- var shipmentItem = _shipmentItemService.Get(model.Id);
- _shipmentItemService.Remove(shipmentItem);
- return RedirectToAction("shipmentitemlist", "shipmentlist", new { id = ShipmentId });
- }
- catch (Exception ex)
- {
- ModelState.AddModelError("CustomError", ex.Message);
- return View(PrepareShipmentItemModel(model));
- }
- }
- return View(model);
- }
Ronika JencyPosted Sep 19, 2019, 5:15 AM
Ahmed AbdiPosted Sep 28, 2019, 10:04 AM
Denmark PusoPosted Sep 28, 2019, 1:40 AM
Tamal Marick
Tamal MarickPosted Sep 26, 2019, 7:03 AM
Denmark PusoPosted Sep 21, 2019, 4:17 AM
Denmark PusoPosted Sep 20, 2019, 8:59 PM
class
="Shipment">ShipmentSonu GuptaPosted Sep 19, 2019, 1:21 PM
Tamal MarickPosted Sep 19, 2019, 2:48 AM