Cs:
No. You are telling the browser that you are sending it a PDF file. You
are then sending it the binary information of a pdf file.
Response.Redire ct works by sending an Http status code of 302 with the new
url. Http status codes don't mean anything to acrobat. In other words, you
can't have your cake and eat it too. You can't say "I'm sending your a PDF
and here's some HTML to go with it".
The only solution would be to open up the link to this pdf in a new window
and then redirect the original browser wherever.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"csgraham74 " <cs********@hot mail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
i have the following code
Response.AddHea der("content-disposition", "attachment ; filename=" &
str_AccountNo & ".pdf")
Response.Conten tType = "applicatio n/pdf"
Response.Binary Write(oDR.GetVa lue(0))
Response.End()
this code successfully prints a pdf document for me.
what i want to do is to redirect to another page after this happens.
if i put in a response.redire ct after the response.end then the code
stops executing immediately at the response.end and no redirect occurs.
if i put it in before the response.end then the the document does not
print.
are there any other alternatives e.g. javascript to get my redirect to
occurr.
thanks in advance
Cg