[EMAIL PROTECTED] schrieb:

>         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

Which error? is Session[useScaleWeight] initialized?

get{ return Session[useScaleWeight]!=null ? 
(bool)Session[useScaleWeight] : false; }

get
{
        object o = Session[useScaleWeight];
        return o != null ? (bool) o : false;
}

or

get{ return Convert.ToBoolean(Session[useScaleWeight]);}


-- 
Freundliche Grüße

Albert Weinert

http://der-albert.com

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