How to call a post function from partial view to api controller in c#

 View JS function:-

DownloadZipFile: function (filePath) {

                    var model = { FilePath: filePath};

                    $app.post('/Admin/DownloadZipFile', model).then(function (response) {

                        if (!response.status) {

                            $app.messageBox.error("File not found");

                        }

                    });

                }


API Controller:-

 public ActionResult DownloadZipFile(TemplateFileModel model)

{

// Code here

}

Share:

No comments:

Post a Comment

Thursday, 21 October 2021

How to call a post function from partial view to api controller in c#

 View JS function:-

DownloadZipFile: function (filePath) {

                    var model = { FilePath: filePath};

                    $app.post('/Admin/DownloadZipFile', model).then(function (response) {

                        if (!response.status) {

                            $app.messageBox.error("File not found");

                        }

                    });

                }


API Controller:-

 public ActionResult DownloadZipFile(TemplateFileModel model)

{

// Code here

}

No comments:

Post a Comment

Popular

Total Pageviews

Archive