I'm having problems with the namespace System.Net.Http.
I want to use, for example. HttpClient, from the namespace System.Net.Http. When I use using System.Net.Http;in a C # class, I can use HttpClient just fine, but when I try to import a namespace in an aspx file, for example: %@ Import Namespace="System.Net.Http" %>it will not register HttpClient:
Could not find the name of the type or namespace "HttpClient" (are you missing the using directive or assembly references?)
I already installed it as this and added it to my links by doing this .
How to use, for example. HttpClient in my .aspx file, how do I use it in a C # class?
UPDATE
This is not a duplicate. Why should I include a namespace on every aspx page? because I am not asking how should I include the namespace in each class.
source
share