|
 |
asp_web_howto thread: Object not a collection: 'Response.ContentType'
Message #1 by "Sidney James P. Fuerte" <fuertsj1104@y...> on Tue, 12 Feb 2002 02:19:32 +0800
|
|
Hi everyone,
again I need your help =)
I am trying to load a PDF file directly on my asp page, here's my code:
sAcctID = Request.Form("txtAccNum")
sStmtDateID = Request.Form("StmtDate")
sSql = "SELECT * FROM table WHERE StmtDateID = '" & sStmtDateID & "';"
Set dbConn=GetDBConnection()
Set rs=dbConn.Execute(sSql)
If Not rs.eof Then
Response.ContentType "application/pdf"
Response.Write ("test.pdf")
End If
I got an error Object not a collection: 'Response.ContentType', do you have
any solution for this? Am I using the right way to load a PDF file on the
browser? or is there another way arount to do this? Any help will surely be
appreciated =)
Thanks/Regards
Sidney
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 12 Feb 2002 10:08:37 +1100
|
|
<request>
Please turn off the High Importance marker - these questions are not
important to us, and the marker is really annoying. I have my email client
set to perform certain actions where high importance messages are received
(ie they are critical to my work). Your messages are important to no one on
the list.
</request>
In answer to your question:
: Response.ContentType "application/pdf"
in incorrect.
.ContentType is a Property of the Response object, hence you set it like
this:
Response.ContentType = "application/pdf"
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sidney James P. Fuerte" <fuertsj1104@y...>
Subject: [asp_web_howto] Object not a collection: 'Response.ContentType'
: Hi everyone,
:
: again I need your help =)
:
: I am trying to load a PDF file directly on my asp page, here's my code:
:
: sAcctID = Request.Form("txtAccNum")
: sStmtDateID = Request.Form("StmtDate")
: sSql = "SELECT * FROM table WHERE StmtDateID = '" & sStmtDateID & "';"
: Set dbConn=GetDBConnection()
: Set rs=dbConn.Execute(sSql)
: If Not rs.eof Then
: Response.ContentType "application/pdf"
: Response.Write ("test.pdf")
: End If
:
: I got an error Object not a collection: 'Response.ContentType', do you
have
: any solution for this? Am I using the right way to load a PDF file on the
: browser? or is there another way arount to do this? Any help will surely
be
: appreciated =)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |