user2265260
user2265260

Reputation:

Can't download file on ie10 using asp.net vb

I made a page where you are able to download files and it works fine in firefox and google chrome but when I do it in IE 10 i get a file with from the type "file" but it has to be pdf and I can't open it.

This is the code I use to download:

        Response.ContentType = "application/pdf"
        Response.AddHeader("Content-disposition", "attachment; filename=""" & inhoud.titel & """")
        Response.BinaryWrite(inhoud.bestand)
        Response.End()

Upvotes: 0

Views: 217

Answers (1)

Diana Nassar
Diana Nassar

Reputation: 2303

Have you tried appending ".pdf" to the filename?

Response.AddHeader("Content-disposition", "attachment; filename=""" & inhoud.titel & """" & ".pdf")

Upvotes: 2

Related Questions