Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ASP within Cold Fusion

Status
Not open for further replies.

silicongelica

Programmer
Dec 12, 2000
7
0
0
US
How do I imbed ASP code into my CFM pages? Is there a special trick to it? I looked at cfobject but this isn't a com component, it's an asp page.. uhm... confused...
 
I've never tried it, but it seems that you should be able to write a separate ASP template, then call it from the CF page via CFHTTP... DarkMan
 
I'm going to try that today, I'll let you know if it does the trick. A girl has to do something when CFML won't write images stored as binary data onto the page!! ASP does it in a snap! Hello Allaire, fix this!
 
Let me know if it does. It may help me with some stuff I'm grappling with..:) DarkMan
 
Well, I got it working, but the answer for me wasn't <cfhttp, it was simply calling the ASP template like so:
<img src=&quot;BinaryWrite.asp?image_id=#image_id#&quot;>
Cfhttp would have worked as well, but the Asp page is in the same directory as my .cfm pages, and cfhttp just gave me Connection errors. Problem is solved partially- now I just need to figure out how to make it give me multiple photos. I'm also having a rediculous Cfoutput problem.... Oh the trials and tribulations of the newbie programmer...
Thank you for your help!
 
If I understand what you're trying to do, I believe the CF code to do the same is :

<img src=&quot;Img.cfm&quot;>

Where Img.cfm contains

<CFCONTENT TYPE=&quot;image/gif&quot; DELETEFILE=&quot;NO&quot; FILE=&quot;d:\test.gif&quot;>

 
Exactly, except for my purposes it was an ASP page being called to display the images, which in my case are stored BLOBs in SQL. The ASP page basically just instantiates a connection to the DB and uses the WriteBinary function.
Good stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top