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
Novica Josifovski
NA
9
1k
Calling a method with Ajax and returning a view
Aug 24 2020 5:24 PM
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)
{
//code shortened for brevity
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.
Reply
Answers (
1
)
Split the String and need the first string
How to generate Client Id and Secret (best practise)