Hi
How to set content type for pdf? I have written like this "application/pdf" , but it taking the value as "application/x-unknown ".
Please provide me solution asap.
Thanks
Gayatri
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
RobbinsonPosted Dec 26, 2013, 6:44 AM
you just need to write
HttpContext.Current.Response.AddHeader("Content-Type", "application/pdf");
This may resolve your issue.
Please don't forget to mark as an answer if this post help you.
Abhay ShankerPosted Dec 26, 2013, 6:15 AM
HttpApplication app
app.Context.Response.ContentType = "application/pdf";