Why isn't HttpUtility class being recognised?

2019-03-25 04:18发布

I am trying to call the static HttpUtility.UrlEncode in my VB.NET project, but the IDE is not recognising the class saying that it is not declared.

I have imported the namespaces System.Net and System.Web to the project.

I also have the following at the top of the file:

Imports System.Net
Imports System.Web

What am I doing wrong?

1条回答
萌系小妹纸
2楼-- · 2019-03-25 05:05

Add a reference to System.Web.dll to your project.

查看更多
登录 后发表回答