Created
April 20, 2018 07:29
-
-
Save mrkacan/4c32a2ec128963f6c708eb2862e5ed78 to your computer and use it in GitHub Desktop.
C# MVC Ajax post to controller (ASP .NET MVC)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
cache: false, | |
url: "YOUR_CONTROLLER_NAME/ACTION_NAME", | |
data: { data: YOUR_DATA }, | |
type: 'post', | |
success: () => { | |
//Do something for success; | |
}, | |
complete: () => { | |
//Do something for complete; | |
}, | |
error: () => { | |
//Do something for error; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment