Originally I was having a javascript and css blocked.
I copied the code down to my local project.
I don't get any errors.
I set a breakpoint on the onpostGetPDF which I believe should fire when you click on the link to view the document and it's not reaching " public JsonResult OnPostGetPDF(int fileId)"
is there something additional I need in the ajax statement below
var data = {};
data.fileId = 1;
var fileId = $(this).attr("rel");
$.ajax({
type: "POST",
url: "/ReferralRequest/Index?handler=GetPDF",
beforeSend: function (xhr) {
xhr.setRequestHeader("XSRF-TOKEN",
$('input:hidden[name="__RequestVerificationToken"]').val());
},
data: { "fileId": fileId },
success: function (r) {
//Convert Base64 string to Byte Array.
var bytes = Base64ToBytes(r.Data);
LoadPdfFromBlob(bytes);