Hi,
this is not possible. Because I'd like to get the smalles http traffic
I don't use the viewstate that must be transfered each time to and
from the server. You have to think about static methods in seperate
classes. The only way is to write them to the page and use it again as
arguments for your AjaxMethods.
Regards,
Michael
On 9/29/06, davidnyc <[EMAIL PROTECTED]> wrote:
>
> In my basepage I have a method which runs from Page_Load to retrieve
> some information from the database and store it in global variables in
> the basepage which are then accessed via get/set from the main page.
>
> Unfortunately, when I call an AjaxPro method in the main page, the
> variables are not available. I could, of course, write these variables
> out to the page in the javascript function which calls the AjaxPro
> method, but I would prefer to keep all of this data behind the scenes.
>
> Can anyone provide some guidance?
>
> Here is some code to demonstrate what I'm doing.
>
> public partial class Organization_Default : GroupBaseClass
> {
> protected void Page_Load(object sender, EventArgs e)
> {
>
> AjaxPro.Utility.RegisterTypeForAjax(typeof(Organization_Default));
> ...
> }
>
> [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.Read)]
> public string SetVolunteer()
> {
> return GroupID;
> }
> }
>
> public class GroupBaseClass : System.Web.UI.Page
> {
> private string _GroupID;
>
> public string GroupID
> {
> get { return _GroupID; }
> }
>
> protected override void OnLoad(EventArgs e)
> {
> _GroupID = 1;
> }
> }
>
>
> >
>
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
Skype: callto:schwarz-interactive
MSN IM: [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/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---