Back in January, I wrote this
post about using the magicAJAX.net framework in Delphi to illustrate AJAX from a Delphi ASP.NET application. This
month I’ve been looking at the AJAX.NET Professional framework
written by Michael Schwarz and
have converted his examples to Delphi for .NET using the 1.1 .NET framework
although AJAX.NET Pro supports both 1.1 and 2.0 versions of .NET.
Once again 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:
- Grab the AJAX.NET Pro net download from here. All
you’re really going to need is the AjaxPro.dll assembly.
- Download the Delphi example source code here
- Unzip delphi_ajaxpro.zip into \inetpub\wwwroot (it contains a directory
a virtual directory under IIS and point it at the directory created above
- Under \inetpub\wwwroot\DelphiAJAXDemo create a directory called “bin”
- Unzip AjaxPro.dll from the download in step 1 into the bin directory created
- Start the IDE and open DelphiAJAXDemo.bdsproj
- From the Project Manager right click References and select Add Reference and
- Compile and run the project, you should see a page that looks like this
NOTE: I intentionally converted this example as closely to the C# example as
possible. I can’t say that in all cases I would have written the same code but I
felt the comparison between C# and Delphi was important enough to keep the code
as similar as possible.
I found a bug in the Class demo code where some
data members were not being initialized. I’ve corrected the code and fixed the
download with these latest changes.
I missed the file quickguide.aspx which is
now included in the download.
Update #3: Fix blog tags for this entry
Update #4: This demo is now available online here.