Atanas,
I got the controller to work with the data from the db.
When i post this from a form all works as expected and the PDF apears as it should . Now i want to call this from a button in a datagrid. I have almost got it to works but not quite.
When i click the yellow button in my datagrid it routes correctly to the controller and it returns but I do not get the PDF.
[Inject]
NavigationManager navigationManager { get; set; }
public async Task PostFormAsync(int docID)
{
HttpClient client = new HttpClient();
var Json = JsonConvert.SerializeObject(docID);
var stringContent = new StringContent(Json, Encoding.UTF8, "application/Json");
var response= client.PostAsync($"{navigationManager.BaseUri}api/Download/DownloadFile/{docID}", stringContent);
What am I missing to get the PDF to finally display?
thanks
John