I want to use the Title Dynamically in my MVC application. Because I am not returning the View instead of that I am returning the PDF report as:
public ActionResult PrintInvoice(long ID)
{
var data = db.Documents.Where(x => x.InvoiceNumber == ID);
ReportDocument rd = new ReportDocument();
rd.ParameterFields["DocumentID"].CurrentValues.IsNoValue = true;
Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
stream.Seek(0, SeekOrigin.Begin);
return new FileStreamResult(stream, "application/pdf"); //For Showing PDF in Browser itself
}
and I a getting Page Title in the Form like,
But I want to Change the Page title here. What should I do for changing the page title Dynamically from the MVC's action itself?