Use System.Web.HttpContext.Current.Session[...] instead of Session[...].

Regards,
Michael

On 7/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have a method that uses session variables: When I make the call to
> the get the value the method immediately returns without executing any
> further. I noticed that if I use them inline they work : ex
> service.getSomeStuff(UseScaleWeight); What am I missing?
>
>
>         private const string useScaleWeight = "useScaleWeight";
>         protected bool UseScaleWeight {
>             get{ return (bool)Session[useScaleWeight]; }
>             set{ Session[useScaleWeight] = value; }
>         }
>
>         [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.Read)]
>         public string SetWeightValue(string curWeightStr, int
> currentWeight) {
>                     bool useTheScale = UseScaleWeight; // fails on this
> line
>
>
> >
>


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

Reply via email to