Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
2427 Points
369 Posts
Sep 01, 2011 05:24 AM|LINK
Session and Server properties are instance based. It cannot be accessed from a shared method.
Use HttpContext.Current property to access those properties.
Change below code
Session("XXX")=Server.mappath()
to
HttpContext.Current.Session("XXX")=HttpContext.Current.Server.mappath()
Raja Boopath...
Contributor
2427 Points
369 Posts
Re: Writing Shared Subroutines in a Class
Sep 01, 2011 05:24 AM|LINK
Session and Server properties are instance based. It cannot be accessed from a shared method.
Use HttpContext.Current property to access those properties.
Change below code
Session("XXX")=Server.mappath()to
HttpContext.Current.Session("XXX")=HttpContext.Current.Server.mappath()