httputility.HtmlEncode in not declared
-
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?
-
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?
Have you added a reference to the
System.Web
assembly, or just imported theSystem.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
-
Have you added a reference to the
System.Web
assembly, or just imported theSystem.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
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.
-
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?
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 -
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.
The
System.Web
namespace exists in multiple assemblies. TheSystem.Web.HttpUtility
class only exists in theSystem.Web
assembly. You will need to add a reference to theSystem.Web
assembly before you can use theSystem.Web.HttpUtility
class.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
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 KreskowiakThanks 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.