Add Comment
Accessing .NET Hashtable in ColdFusion Tutorial
ColdFusion Tutorial #15
A .NET hashtable can be used as a Structure in coldfusion, the example below explains the necessary steps.
Create a Class Library which generate Hashtable (collection or structure)
Call the .Net method from Coldfusion
demo.cfm
This is really simple.Line 1 creates a .NET object called Htdemo from the Hashtable.dll
Line 2 invokes the getInfo() method
and
Line 4 outputs the result.
hashtable.cs
The C# code is just as simple.Line 9 declares the getInfo method with a Hashtable return type
Line 10 creates a Hashtable
Lines 12 - 17 populates elements of the Hashtable
and
Line 19 Returns the object.
Demo
See this code running!
Download
Download this code as a zip!
Comments
There are no comments!Click button to add a comment
Author
Vishnu Prasad
Published
Friday 19 Oct 2007Original
This tutorial has been modified and published with permission of the author. The original tutorial can be found herehttp://wrvishnu.wordpress.com/2007/09/28/access-net-hashtable-in-coldfusion/