Hi
How do i get the session object from within a static method ?
The system seems to call this method when binding to the objectdatasource.
I have a dataobject class with the dataobject attributte set.
[DataObjectMethod(DataObjectMethodType.Select, false)]
public ICollection<CartOrderLine> GetCart()
{
...
how do i get the session object here ?
...
}
johan
Anthony Jones - 28 Mar 2008 13:19 GMT
> Hi
>
[quoted text clipped - 14 lines]
>
> }
using System.Web;
HttpSessionState sess = HttpContext.Current.Session

Signature
Anthony Jones - MVP ASP/ASP.NET
bruce barker - 28 Mar 2008 18:01 GMT
tying your business object to asp.net session is really, really poor design.
create an adapter to move data to/from session to the business object.
-- bruce (sqlwork.com)
> Hi
>
[quoted text clipped - 16 lines]
>
> johan