CFM Includes

  • Thread starter Thread starter Derek
  • Start date Start date
D

Derek

We currently develop classic asp & asp.net and cold fusion
mx web
applications. Does anyone know if there is any way to
include/call cfm pages inside a .net/asp web app?

Just trying to avoid having to rebuild an app in .net if
we do not have to. Any advice/instruction would be
greatly appreciated.

Derek M
 
It is possible to "call" external web pages from asp.net, regardless of
whether those pages are in ASP.NET, PHP, CFM, JSP, whatever. It's all just
HTTP.

If the returned web page is formatted as XML, you can then parse the XML (or
deserialize it).
if it is HTML, you can display it or parse it,
etc.

It's up to you.

for a GET, you would do something like this:
string urlspec= "http://www.google.com";
System.Net.WebRequest req= System.Net.WebRequest.Create(urlspec);
System.IO.StreamReader sr = new System.IO.StreamReader
(req.GetResponse().GetResponseStream());
result= sr.ReadToEnd ();

The result would then hold the raw HTML. If you wanted to invoke a local
page, you could use http://localhost/cfmdir/whatever.cfm as your urlspec.

For a POST the code is somewhat different but the principle is the same.
 
Back
Top