Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller.cs
- ------------------------------------------------------------------------------------
- [HttpPost]
- [Route("~/api/reports/DownloadCSVDamages/{date}")]
- public HttpResponseMessage DownloadCSVDamages([FromUri]DateTime date)
- {
- HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
- return result;
- }
- Javascript
- --------------------------------------------------------------------------------------
- $scope.downloadCSV = function () {
- var theDate = moment();
- $.ajax({
- type: 'POST',
- url: '/api/reports/DownloadCSVDamages',
- data: theDate
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement