1. Setup ajax in your web project (lookup for it www.ajaxpro.info)

2. Register your page class:
AjaxPro.Utility.RegisterTypeForAjax(YourPageClass)

3. Create method to add values into Session:
[AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
public void AddToSession(string value1, string value2....) {
HttpContext.Current.Session("session_variable") = value1;
...
}
AjaxPro.HttpSessionStateRequirement.ReadWrite is requered to read/write
Session.
Access to session staticlly from HttpContext, I havent managed to do it
otherwise.

4.Add on click on your button call to this method,
AssemblyQualifiedName.YourPageClass.AddToSession(value1,value2...,
callback())
callback as last parameter is optional, if you want to do something
when finished
function callback(response) {
...(see in debugger for response properties)
}

This should work :)


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

Reply via email to