TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Denmark Puso
NA
232
50.7k
RedirectToAction not working?
Sep 18 2019 9:03 PM
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);
}
Reply
Answers (
8
)
How to use DTO in Asp.Net Core Web API
Jquery Multi select listbox