scm0sml
asked on
httpresponse with jquery and c#
I have the following:
var response = System.Web.HttpContext.Cur rent.Respo nse;
response.Clear();
response.AddHeader("Conten t-Type", "binary/octet-stream");
response.AddHeader("Conten t-Disposit ion", "attachment; filename=PMSQuestionnaireR esults.pdf ; size=" + pdfBytes.Length.ToString() );
response.Flush();
response.BinaryWrite(pdfBy tes);
response.Flush();
response.End();
This is exporting a pdf that I have created and works fine.
I wanted to call the function that does this though with jquery.
This is now broken.
When I check the response in firebug I see:
Seems to be the content of the pdf?
Is there a way around this?
I could use a swift reply on this!
Thanks
var response = System.Web.HttpContext.Cur
response.Clear();
response.AddHeader("Conten
response.AddHeader("Conten
response.Flush();
response.BinaryWrite(pdfBy
response.Flush();
response.End();
This is exporting a pdf that I have created and works fine.
I wanted to call the function that does this though with jquery.
This is now broken.
When I check the response in firebug I see:
%PDF-1.4
%¿¿¿¿
%Created by Wnv/EP PDF Tools v8.0
1 0 obj
<<
/Pages 2 0 R
/PageLayout /OneColumn
/PageMode /UseNone
/ViewerPreferences 3 0 R
/Type /Catalog
>>
endobj
2 0 obj
<<
/Count 2
/Kids [4 0 R 5 0 R]
/Type /Pages
>>
endobj
4 0 obj
<<
/Resources <<
/ProcSet [/PDF /Text /ImageC]
/XObject <<
/NAME_njifnhheinnmklihpcigknpdilkojllb 6 0 R
/NAME_himklphdmcenkdchpjfgnldlngmlkijm 7 0 R
Seems to be the content of the pdf?
Is there a way around this?
I could use a swift reply on this!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.