Thanks ya,
How can tranfer created mpp file to client in download format like save file option from browser.
Now store the file in local. but after deployement how can i store the file server.
Thanks
Sankar A
Thanks ya,
How can tranfer created mpp file to client in download format like save file option from browser.
Now store the file in local. but after deployement how can i store the file server.
Thanks
Sankar A
Hi Sankar,
Thank you for contacting Aspose support team.
You can use the following code sample to send the processed Project file to client’s browser for saving on local server. The code assumes that user has clicked a button for downloading the MPP file to the disc. Please let us know if we can be of any additional help to you in this regard.
Sample Code:
protected void Button4_Click(object sender, EventArgs e)
{
Project project = new Project(@"C:\Project1.mpp"); //Save the project to memory stream for sending to browser
var ms = new MemoryStream();
project.Save(ms, Aspose.Tasks.Saving.SaveFileFormat.MPP);
ms.Position = 0;
byte[] buffer;
buffer = ms.ToArray();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-project";
Response.AddHeader("content-disposition", "attachment;filename=" + "Sample.mpp");
Response.BinaryWrite(buffer);
Response.End();
}