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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cold fusion communicates with asp

Status
Not open for further replies.

anitalulu

Programmer
Nov 19, 2002
23
HK
does anybody know how to communicate with asp page when i using cold fusion page?

I want to pass some variables in cold fusion to asp page.
Can I do this?
 
You can pass variables from CF to ASP using Form and URL variables in the same way that you do in CF.

Form:

<form action=&quot;index.asp&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;something&quot; value=&quot;asdf&quot;>
<input type=&quot;submit&quot; value=&quot;Go Go ASP&quot;>
</form>

this will pass the form variable something to the ASP page called index.asp.

You can use the URL in the same way:

<CFLOCATION URL=&quot;index.asp?Something=asdf&quot;>

Would pass the variable something along the URL to the ASP page index.asp.

or going back to the form example above you could append a URL variable to the end of the action attribute like this:

<form action=&quot;index.asp?Something=asdf&quot; method=&quot;post&quot;>

Hope this helps!

Tony
 
I can't put the variable into the URL. Because it is the username and password.

Any suggestion?
 
You can set a cookie. As long as the CFM and ASP pages are executed in the same domain (e.g. mydomain.com) you will be able to read cookies set with CFM using ASP and vice-versa.

-Tek
 
You are right. I can set the cookies for both CFM and ASP. However, how can I delete the cookies in CFM and ASP?
 
To delete a cookie in CF:
Code:
<cfcookie name=&quot;mycookie&quot; expires=&quot;NOW&quot;>
To delete a cookie in ASP:
Code:
Response.Cookies(&quot;mycookie&quot;) = &quot;&quot;

-Tek
 
you can use WDDX to send data accross CF & ASP refer to CF manual ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top