I have a method Show which returns a view Show with a model. I use that model to populate two Kendo grids.
In the Show view, I have a button which on click, sends a model from the view to a method Save in the controller.
Due to the fact that I call the Save method via an ajax call, I cannot return a view in the Save method.
I tried two solutions.
I tried to create a third method, let's call it Test for the sake of the argument and I tried to use
RedirectToAction from Save and redirect it to Test but I found out that RedirectToAction does not work with an ajax call.
I decided to try with a partial view but it's also not working.
- public ActionResult SaveFile(List<Model> model, int type)
- {
-
- return PartialView(model, type);
- }
This also does not work. I am kind of stuck with this internship task I got with an existing .net core app and I am not sure how to proceed.