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;
}
}
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---