Server.HtmlDecode for windows services (Urgent)

S

Sonu Kapoor

Hello,

does anybody knows the equilant of Server.HtmlDecode when
creating a windows service?

Thanks, Sonu
 
K

Karl

I think System.Web.HttpUtility.HtmlDecode, which is a static function,
should do the trick. HttpUtility is a pretty useful class for programs
which don't have access to a Server object like you do in ASP.Net

Karl
 
S

Sonu Kapoor

Hi Karl,

I get the following error when using this:

"HttpUtility" is not a member of "web".

Sonu
 
K

Karl Seguin

You don't have the System.Web.dll referenced in your project.

Unfortunately, System.dll actually has a System.Web namespace in it, which
is why the error is what it is. Simply reference System.Web.dll :)

Karl
 
S

Sonu Kapoor

Hello,

I imported the System.Web via the project properties
and thought that this should be enough. But it wasnt. I
have reference System.Web and it works now. Many thanks.

Sonu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top