In my controller I have the following action to create a PDF
public async Task<IActionResult> ExportMailingLabel(int CustomerID, int ProductID)
{
var mailingLabel = await NoticeService.CreateMailingLabel(CustomerID, ProductID);
return File(mailingLabel.NoticeContents, "application/pdf", "MailingLabel.pdf");
}
And In my view i have the following link,
<a asp-action="ExportMailingLabel" asp-controller="Product" asp-area="Product" asp-route-CustomerID="@Model.CustomerID" asp-route-ProductID="@Model.ProductID" class="btn btn-primary"><i class="fa fa-receipt"></i> View Mailing Label</a>
I need help when on click to open the PDF in a new Tab instead of displaying Open Dialog box.
I tried target="_blank" but i seems like it open a new tab but still shows open dialog box