Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
Hi All,

I am trying to use HTTPUtility in c# .net. i have added reference Sytem.Web. but still it is not showing.

am i missing something


pls help

Thanks in advance
Regards
Nirmala

What I have tried:

added reference System.Web but still it not showing web utility
Posted
Updated 24-Aug-21 21:55pm

Since you haven't shown any code or other details, and you seem confused about which class you're trying to use, we can only offer general advice.

The System.Web.HttpUtility class is defined in the System.Web assembly for .NET Framework, and the System.Web.HttpUtility assembly for .NET Core / .NET 5. You need to make sure you have added a reference to the relevant assembly, not just imported the namespace.

The System.Net.WebUtility class is defined in the System assembly for .NET Framework, the System.Runtime.Extensions assembly for .NET Core, and the System.Runtime assembly for .NET 5. Again, you need to ensure you have a reference to the correct assembly before trying to use it.
 
Share this answer
 
Hi,

you can use
System.Net.Webutility

I encountered this issue in .net 4.5.2 (using VS2019). and this solved by replacing

System.Web.Utility with System.Net.Webutility

You Can find details in this Link

I Hope This will Help you.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900