473,385 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

System.Web.HttpUtility is not available

Hi all.

Just tearing my hair out here. VSN03 XP all latest.

I'm trying to gain use of System.Web.HttpUtility.UrlEncode("string").

The problem is, it isn't there.

I've got:

using System.Web;

I've tried:
System.Web.HttpUtility.UrlEncode("mystring");

Intellisense for System.net only offers:
AspNetHostingPermission
AspNetHostingPermissionAttribute
AspNetHostingPermissionLevel

The 'FindType' utility tells me it's there:
E:\Visual Studio Projects>findtype httputility
class System.Web.HttpUtility
class System.Web.HttpUtility+UrlDecoder

Any attempt to use HttpUtility just gets:
cs(29): The type or namespace name 'HttpUtility' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference?)

My VS.net03 help finds it with F1 and tells me the namespace is System.Web...

Fer Gosh sakes...it's fully qualified AND I've got the using System.Web clause

What is going on?

bullshark

Nov 15 '05 #1
5 64198
Most likely you need to add a reference to it. Right click references in the treeview in solution explorer, click add, find
System.web and add it.

--
Michael Culley
"bullshark" <bu*******@scubadiving.com> wrote in message news:ma********************************@4ax.com...
Hi all.

Just tearing my hair out here. VSN03 XP all latest.

I'm trying to gain use of System.Web.HttpUtility.UrlEncode("string").

The problem is, it isn't there.

I've got:

using System.Web;

I've tried:
System.Web.HttpUtility.UrlEncode("mystring");

Intellisense for System.net only offers:
AspNetHostingPermission
AspNetHostingPermissionAttribute
AspNetHostingPermissionLevel

The 'FindType' utility tells me it's there:
E:\Visual Studio Projects>findtype httputility
class System.Web.HttpUtility
class System.Web.HttpUtility+UrlDecoder

Any attempt to use HttpUtility just gets:
cs(29): The type or namespace name 'HttpUtility' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference?)
My VS.net03 help finds it with F1 and tells me the namespace is System.Web...

Fer Gosh sakes...it's fully qualified AND I've got the using System.Web clause

What is going on?

bullshark

Nov 15 '05 #2
On Mon, 20 Oct 2003 10:37:08 +1000, "Michael Culley" <mc*****@NOSPAMoptushome.com.au> wrote:
Most likely you need to add a reference to it. Right click references in the treeview in solution explorer, click add, find
System.web and add it.


eh? OK? It works?

but why don't I have to do that for
System.IO/Net/Threading etc....

I thought the idea of "using" was to make a reference.

confused but fixed,

bullshark
Nov 15 '05 #3
"bullshark" <bu*******@scubadiving.com> wrote in message news:3a********************************@4ax.com...

using just saves you typing System.Web.xxx over and over, it doesn't add the reference for you.

--
Michael Culley
Nov 15 '05 #4
On Tue, 21 Oct 2003 07:40:43 +1000, "Michael Culley" <mc*****@NOSPAMoptushome.com.au> wrote:
"bullshark" <bu*******@scubadiving.com> wrote in message news:3a********************************@4ax.com...

using just saves you typing System.Web.xxx over and over, it doesn't add the reference for you.


Well Gee whiz. There's a clue.

Maybe the obvious isn't so obvious.

I don't have to add references for everything else in the System,
why was System.Web there in the first place (abbreviated)
Where was
AspNetHostingPermission
AspNetHostingPermissionAttribute
AspNetHostingPermissionLevel
....coming from?
Why was it necessary to add a reference, when
IO/Net/Text/....all are available without?

oh, nevermind. I was under the impression that .net
was a little smarter than java, but I guess not.
Java classpath at least points to everything needed to
use the standard classes, and when the classpath needs
additions, the docs at least say so.
Nov 15 '05 #5
When you add a reference to a file it can be called anything, so MyDll could contain any number of namespaces. The System.Web dll
does not have to contain the namespace System.Web and it can contain other namespaces (I assume it does).
oh, nevermind. I was under the impression that .net
was a little smarter than java, but I guess not.
It ain't that complicated, if you need something that's not there you just add a reference.
Java classpath at least points to everything needed to
use the standard classes, and when the classpath needs
additions, the docs at least say so.
If you created a web app from the wizard then you should have that reference. If you created some other sort of app then it makes
sense to need to add it. I would prefer to have a minimal set of reference as standard.

--
Michael Culley
"bullshark" <bu*******@scubadiving.com> wrote in message news:s3********************************@4ax.com... On Tue, 21 Oct 2003 07:40:43 +1000, "Michael Culley" <mc*****@NOSPAMoptushome.com.au> wrote:
"bullshark" <bu*******@scubadiving.com> wrote in message news:3a********************************@4ax.com...

using just saves you typing System.Web.xxx over and over, it doesn't add the reference for you.


Well Gee whiz. There's a clue.

Maybe the obvious isn't so obvious.

I don't have to add references for everything else in the System,
why was System.Web there in the first place (abbreviated)
Where was
AspNetHostingPermission
AspNetHostingPermissionAttribute
AspNetHostingPermissionLevel
...coming from?
Why was it necessary to add a reference, when
IO/Net/Text/....all are available without?

oh, nevermind. I was under the impression that .net
was a little smarter than java, but I guess not.
Java classpath at least points to everything needed to
use the standard classes, and when the classpath needs
additions, the docs at least say so.

Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: kwele | last post by:
I need to use the HttpUtility.UrlEncode method in a winform. However, the HttpUtility class is not available in intellisense from System.Web. What do I need to do to be able to use this method? ...
3
by: nntp1.sympatico.ca | last post by:
Hello all, Do System.Xml.XmlNode's have a unique system ID available via a property somehow? I have nodes which may be very similar or even identical (but in different locations) in a...
4
by: Andreas Klemt | last post by:
Hello, is there a difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode ?
2
by: Brett | last post by:
In one vb.net project, I can do Imports System.Web.HttpUtility and have access to the URLEncode method. In another project, the same import says HttpUtility is not a member of Web. Why...
1
by: Juan Carlos Diez | last post by:
Hello, I'm evaluating that version and I can't find system requirements for it. Could anybody please help me with these questions? 1.1. Hardware: 1.1.1. C.P.U. (how many processors, what speed)...
14
by: gio | last post by:
I have a problem and the solution should works under windows and unix OS. Suppose I have a program ex.c in the directory X (so the current working directory of ex.c is X). Also suppose I have...
9
AmberJain
by: AmberJain | last post by:
Hello, What is the difference between --------> 1. clrscr(); // defined in various header files 2. system("cls"); //available in stdio.h in bloodshed dev c++ Well,...
6
by: CindyH | last post by:
Hi I'm not sure whether I should send this as a new message or use the one I've been using but... I'm using vb.net 2.0 - My problem is I need to send something like this: 'dim encodedstring =...
1
by: Don Clemens | last post by:
Ok, so I downloaded a class online (OAuthBase.cs). Every time I plug it into my project, I am getting "The name 'HttpUtility' does not exist in the current context" error. I got this from the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.