Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. httputility.HtmlEncode in not declared

httputility.HtmlEncode in not declared

Scheduled Pinned Locked Moved .NET (Core and Framework)
xmlhelpquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QuickBooksDev
    wrote on last edited by
    #1

    httputility.HtmlEncode in not declared VB.2008 Windows App, I see plenty of references to htmlEncode but getting it declared seems to be an issue. Imported System.Web and Xml and Net, etc but just cannot to httputility.HtmlEncode What am I missing?

    Richard DeemingR D 2 Replies Last reply
    0
    • Q QuickBooksDev

      httputility.HtmlEncode in not declared VB.2008 Windows App, I see plenty of references to htmlEncode but getting it declared seems to be an issue. Imported System.Web and Xml and Net, etc but just cannot to httputility.HtmlEncode What am I missing?

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Have you added a reference to the System.Web assembly, or just imported the System.Web namespace? (You'll need to do both.)


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      Q 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Have you added a reference to the System.Web assembly, or just imported the System.Web namespace? (You'll need to do both.)


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        Q Offline
        Q Offline
        QuickBooksDev
        wrote on last edited by
        #3

        Original just imported. Added System.Web to Imported Names spaces but did NOT help. If I put in system.web. httpUtiltity does NOT appear. Only get 3 options AspNetHostingPermission,AspNetHostingPermissionAtribute, and AspNetHostingPermissionLevel.

        Richard DeemingR 1 Reply Last reply
        0
        • Q QuickBooksDev

          httputility.HtmlEncode in not declared VB.2008 Windows App, I see plenty of references to htmlEncode but getting it declared seems to be an issue. Imported System.Web and Xml and Net, etc but just cannot to httputility.HtmlEncode What am I missing?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          HttpUtility is in System.Web.dll. Add a reference to that .DLL (the correct version for the .NET Framework you are targeting!!) then import the namespace at the top of your code file. If you're using C#, it's case-sensitive. httpUtility does not = HttpUtility.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          Q 1 Reply Last reply
          0
          • Q QuickBooksDev

            Original just imported. Added System.Web to Imported Names spaces but did NOT help. If I put in system.web. httpUtiltity does NOT appear. Only get 3 options AspNetHostingPermission,AspNetHostingPermissionAtribute, and AspNetHostingPermissionLevel.

            Richard DeemingR Offline
            Richard DeemingR Offline
            Richard Deeming
            wrote on last edited by
            #5

            The System.Web namespace exists in multiple assemblies. The System.Web.HttpUtility class only exists in the System.Web assembly. You will need to add a reference to the System.Web assembly before you can use the System.Web.HttpUtility class.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

            1 Reply Last reply
            0
            • D Dave Kreskowiak

              HttpUtility is in System.Web.dll. Add a reference to that .DLL (the correct version for the .NET Framework you are targeting!!) then import the namespace at the top of your code file. If you're using C#, it's case-sensitive. httpUtility does not = HttpUtility.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              Q Offline
              Q Offline
              QuickBooksDev
              wrote on last edited by
              #6

              Thanks Dave. That did it. I removed the names space which was causing and conflict. It now works. It is VB. I hate languages that are case sensitive.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups