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 JencyRank #770 · 3K reputationPosted Sep 19, 2019, 1:15 AM EDT
Tamal MarickRank #4,584 · 336 reputationPosted Sep 18, 2019, 10:48 PM EDT
Sonu GuptaRank #1,261 · 1.4K reputationPosted Sep 19, 2019, 9:21 AM EDT
Denmark PusoRank #7,130 · 248 reputationPosted Sep 20, 2019, 4:59 PM EDT
class
="Shipment">ShipmentDenmark PusoRank #7,130 · 248 reputationPosted Sep 21, 2019, 12:17 AM EDT
Tamal MarickRank #4,584 · 336 reputationPosted Sep 26, 2019, 3:03 AM EDT
Denmark PusoRank #7,130 · 248 reputationPosted Sep 27, 2019, 9:40 PM EDT
Tamal Marick
Ahmed AbdiRank #1,099 · 1.7K reputationPosted Sep 28, 2019, 6:04 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts