Solved

Server.UrlEncode syntax not regoznized by compiler

Posted on 2008-06-17
2
269 Views
Last Modified: 2010-04-15
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
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Expert Comment

by:jcoehoorn
ID: 21806636
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
 
LVL 16

Accepted Solution

by:
burakiewicz earned 500 total points
ID: 21807118
add a reference in your project to System.Web. then use
HttpUtility.UrlDecode();
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question