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:
- Support unicode chars in both directions
- Support your own object converters. There are already some converters installed like System.Data.DataSet/DataTable/DataRow, System.Collections.ArrayList, System.DateTime/TimeSpan.
- 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.
- 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
Comments have been disabled for this content.
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?
Michael Schwarz said
Hi Arno, SessionState is available, now. I forgot to include this source.
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.
Michael Schwarz said
@Marc: I'd like to change it to an open source project but I am not sure if it is the best way. At the moment I have time enought to fix bugs and add new features in my free time.
Michael Hensen said
Superb work Michael..
Do you have a wished feature or soon to come, or at least thinking of list .. ?
Just curious :-)
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
Michael Schwarz said
I put the new documentation online. Thanks to Karl for his work!!!!
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.
Michael Schwarz said
Ok, I will add a new attribute [Ajax.RequireSessionState].