Hi, there is no change between the older version and the Professional one. The library will always only call the method, no event like Page_Load will be invoked. You have too think about something like static methods, and that is the reson why I always create seperate classes for these methods.
Regards, Michael On 4/4/06, piero <[EMAIL PROTECTED]> wrote: > > Should be "Access to Instance variables" of C# Classes... > > I never looked at source code, so sorry for question.. > Using the "old" version of the library (but seems from previous post, > anything has changed in AjaxPro): > Every call to an AjaxMethod create a new instance of the class, so the > state is lost. > This is very bad when: > - ajax methods use other complex objects, which should be initialized > only on PageLoad. > -ajax methods use instance variables of the class, and this varibles > should be initialized from config file. > -the class is becoming "big" (why I should create an instance of a > class with 50 methods if I only use one, at each call (obviously)) ? > > So the question for the author (or anyone how know internals is): > If it's true that every call to an ajax method create an instance of > the class which contains the metohods (with previous ajax version I'm > sure the state is lost), why this design ? One would expect the class > to be instanciated only on PageLoad... > > Thanks a lot and...pleas replay, this is one of the most important > things, I think..... > > Piero > > ---------- Forwarded message ---------- > From: cpt.oneeye > Date: Tue, 28 Feb 2006 05:37:51 -0800 > Subject: Re: Access to Instances of C#-Classes > To: "Ajax.NET Professional" <[email protected]> > > Hello Hendry, > > > yes i am using <namespace>.<classname>.<methodname> to access (in my > example i didn't defined a namespace). > > but the problem is that AJAX always creates a new instance of my class, > foreach method-call. > > my question now: is it possible as in the first ajax version to access > method of a special instance? > > > > > -- Kind regards, Michael Schwarz Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer http://www.schwarz-interactive.de/ mailto:[EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info -~----------~----~----~----~------~----~------~--~---
