Ajax.NET - new version available (SessionState support!!!)

There is a new version available of the free Ajax.NET Wrapper DLL. The main new features are:

  1. Support unicode chars in both directions
  2. Support your own object converters. There are already some converters installed like System.Data.DataSet/DataTable/DataRow, System.Collections.ArrayList, System.DateTime/TimeSpan.
  3. Support your own objects as Javascript objects, i.e. create a new instance of an System.DateTime object on the client and send it as an argument to a method on the server. Every object converter can render client script that will be needed to do this transformation.
  4. Updated: support for the SessionState variables

There is also a new example available at http://ajax.schwarz-interactive.de/csharpsample/default.aspx

The examples are working with Internet Explorer 5 or higher, Firefox, Netscape 7.2. Safari should be working also, is there anyone who can send me a screenshot if the page is working on safari? Thanks to Andre Seifert who tested it on a Linux machine.

11 Comments

  • Arno said

    I'm currently trying out your module and i'm very impressed.
    A problem I ran in to is that i couldn't access session objects in the javascript enabled methods. After some searching i found out this is because the pagehandler doesn't extend/implements the IRequiresSessionState interface.
    Is this intentional?

  • Marc said

    Hey, this is what we want!!! I asked for the session variable for 5 days and today we get a new release. Michael, why do we need open source if everythink is done automatic...? Ok, that was a joke.

  • James said

    I needed to mark some classes as serializable for binary serialization. After I did that, I noticed that all of my AjaxMethod functions only returned a string containing the name of the type instead of the actual object since I didn't overload the ToString() method. Am I going to need to create a class implementing the IAjaxObjectConverter to get around this?

  • Michael Schwarz said

    @James: Yes, if the Ajax.NET Wrapper DLL will not find any IAjaxObjectConverter it will use the .ToString() method to serialize the object. Because Javascript cannot use a binary stream you have to write your own converter. If you need help contact me using the contact form here at my blog.

  • karl said

    Hey guys,
    I realize the new version made the doc really out of date. I've sent a new updated version to Michael. Nothing on object converters yet, but hopefully I'll write something up on it soon.

    Cheers,
    Karl

  • Andrew Cupper said

    Great work. It would be nice if you could mark individual methods as requiring session state, rather than loading it for every callback.

Comments have been disabled for this content.