Word-Jpeg-Pdf is showing instead of download

doc.Save(HttpContext.Current.Response, documentName + ".jpg", ContentDisposition.Inline, options);

Here this code is used to send document to browser…
But i except download the document… but now it is opening in browser
I am not saving document… because documents are dynamically generating
How can i get download the documet(word,pdf,jpeg) from browser…!

Hi there,

Thanks for your inquiry. Please use ContentDisposition.Attachment instead of ContentDisposition.Inline.

Using ContentDisposition.Attachment option sends the document to the browser and present an option to save the document to disk or open in the application associated with the document’s extension.

doc.Save(Response, “Out.Jpeg”, ContentDisposition.Attachment, options);