Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 04, 2012 07:10 PM by pratiksolanki
Dec 03, 2012 05:21 AM|LINK
I have web application. I have a sepertate class library for Business logic layer. I tried to access HttpContext class in Business logic layer. When i type "System.Web.HttpContext" , I am getting this below error.
" The type or namespace name 'HttpContext' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) "
Whats wrong and why i cannot access Httpcontext class?? Please help.
Dec 03, 2012 05:46 AM|LINK
did u try adding reference to "System.Web" dll in class library... by right clicking on class library project and "Add Reference"?
hope this helps...
Dec 04, 2012 07:10 PM|LINK
Right click Project-->Add Reference--> Dialog box will open up--> select here --> System.Web
Then in your code file add directive.
(For vb use Import)
If you don't add directive then you have to right system.web.httpcontext if you add directive then you just have to right httpContext
Hope this helps