• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

Server.UrlEncode syntax not regoznized by compiler

I'm coding in the .NET 3.5 framework.  I have included the using for System.Web.

When I try the following statement it tries to suggest the namespace Microsoft.SQLServer.Server instead when I mouse over Server.

Server.UrlEncode(myURL);

I try this but it also does not recognize "Server"

System.Web.Server.UrlEncode(myURL);

The System.Web assembly is obviously included in this non-web project also...so what the heck?
0
dba123
Asked:
dba123
1 Solution
 
Joel CoehoornDirector of Information TechnologyCommented:
Not all .Net base assemblies are referenced in every .Net project by default.  Web projects don't reference System.Windows.Forms, for example.  You can add the references you need manually just like you add references to other assemblies.
0
 
burakiewiczCommented:
add a reference in your project to System.Web. then use
HttpUtility.UrlDecode();
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now