A Razor view has 3 buttons inside a form. All button\'s actions will need form values which are basically values coming input fields.
Every time I click any of butto
You can use JS + Ajax. For example, if you have any button you can say it what it must do on click event. Here the code:
Here your button in html: in the script section, you need to use this code (This section should be at the end of the document):
And finally, you need to add ajax function (In another script section, which should be placed at the begining of the document):
function myFunc() {
$.ajax({
type: "GET",
contentType: "application/json",
url: "/myController/myFuncOnController",
data: {
//params, which you can pass to yu func
},
success: function(result) {
error: function (errorData) {
}
});
};