How to display PDF File on Ajax Model
PopUpExtender?
Show File
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Abrar Ahmad AnsariRank #3,390 · 425 reputationPosted Jun 1, 2015, 12:24 AM EDT
{
string path = @"C:\Swift3D.pdf";
WebClient client = new WebClient();
Byte[] buffer = client.DownloadData(path);
if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",buffer.Length.ToString());
Response.BinaryWrite(buffer);
}
}
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 1, 2015, 12:44 AM EDT