Hey everyone,
I'm working with a route/action in my controller that looks like this:
[RoutePrefix("widgets/download-functions")]
[Route("download/{publishedReportId}"), HttpGet]
public ActionResult Download(int publishedReportId)
Now, I'm trying to set up some routing in my JavaScript code using the appropriate id.
Here's what I have so far in my js code (but it's not working). Can you spot what I'm missing?
self.downloadFile = function (data) {
console.log(data);
console.log("@(Url.Action("Download", new { publishedReportId = 9999 }))");
console.log("@(Url.Action("Download"))");
};
I'm still pretty new at this and learning as I go, so I'm sure it's something simple.
When I run this code, the console outputs the following:
Console output
https://i.sstatic.net/QfHWu.png
Thanks, jonpfl