Server.HtmlDecode for windows services (Urgent)

Discussion in 'ASP .Net' started by Sonu Kapoor, Oct 28, 2004.

  1. Sonu Kapoor

    Sonu Kapoor Guest

    Hello,

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

    Thanks, Sonu
     
    Sonu Kapoor, Oct 28, 2004
    #1
    1. Advertisements

  2. Sonu Kapoor

    Karl Guest

    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
     
    Karl, Oct 28, 2004
    #2
    1. Advertisements

  3. Sonu Kapoor

    Sonu Kapoor Guest

    Hi Karl,

    I get the following error when using this:

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

    Sonu
     
    Sonu Kapoor, Oct 28, 2004
    #3
  4. Sonu Kapoor

    Karl Seguin Guest

    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
     
    Karl Seguin, Oct 28, 2004
    #4
  5. Sonu Kapoor

    Sonu Kapoor Guest

    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
     
    Sonu Kapoor, Oct 28, 2004
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.