An AJAX example in Delphi with ASP.NET using

I’ve been playing with AJAX a lot lately and thought it would be good to post an AJAX example using Delphi for .NET. There are lots of AJAX libaries/frameworks available and the one I’ve chosen for this example is Rather then reinvent the wheel I’ve taken this example and converted it to use Delphi.

I’m going to assume you’ll be running this example from IIS. To get this example to work in Delphi for .NET you’ll need to do the following:

  1. Grab the download from here. All you’re really going to need is the magicajax.dll assembly.
  2. Download the Delphi example source code here
  3. Unzip into \inetpub\wwwroot (it contains a directory called DelphiMagicAjax)
  4. Create a virtual directory under IIS and point it at the directory created above
  5. Under \inetpub\wwwroot\DelphiMagicAjax create a directory called “bin”
  6. Unzip magicajax.dll from the download in step 1 into the bin directory created above
  7. Start the IDE and open DelphiMagicAjax.bdsproj
  8. From the Project Manager right click References and select Add Reference and add magicajax.dll
  9. Compile and run the project, you should see a page that looks like this

To add the panel to your palette:

  1. Select Component | Install .NET Components…
  2. Click Select an Assembly and locate magicajax.dll and click OK

For more information check out the website.