jbogard / ContosoUniversityCore

MIT License
590 stars 150 forks source link

Purpose of RedirectToActionJson #9

Closed grokky1 closed 7 years ago

grokky1 commented 7 years ago

Anyone know what is the purpose of RedirectToActionJson? Used here for example.

It's used in many actions.

Why not just redirect to the action directly - the request was made normally, so why respond with JSON?

DejanMilicic commented 7 years ago

As you can see here, by default all forms (unless they are marked with "no-ajax" class) are submitted via ajax.