ASP.NET
Problem:
When using Current.Response in a custom ASP.NET class there are compiler errors e.g.
The name 'HttpContext' does not exist in the current context
The type or namespace name 'HttpContext' does not exist in the namespace 'System.Web' (are you missing an assembly reference?
Solution:
- Add System.Web as a reference to the class. Right click the class in the Solution Explorer and choose Add Reference. On the .NET tab select System.Web.
- Insert the following at the top of the class: using System.Web;
No comments:
Post a Comment