Audict 0 Newbie Poster

Hi all

I want to get a file (pdf) via a parameter and stream it to the clients browser (this part works).

Now my problem is, that when you click save, it suggests the name of the .aspx with a .pdf extension. How can I change this?

Here's my code:

Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "inline;filename=test.pdf");

Response.WriteFile(fp);
Response.Flush();
Response.End();

Thanks in advance!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.