Friday 12 Mar 2010   
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 2007

Original

This tutorial has been modified and published with permission of the author. The original tutorial can be found here
http://wrvishnu.wordpress.com/2007/09/28/access-net-hashtable-in-coldfusion/ 

Tags

cfdump  cfobject  cfset 

convert dvd to ipod converter psp   Winnipeg Colleges   Free debt consolidation loan services.   SSAT Prep   Tutorial Jobs for Felons Online   Discount cigarettes   online MBA degree   EMF Financial   Sharath Sury