Solved

Server.UrlEncode syntax not regoznized by compiler

Posted on 2008-06-17
2
266 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with SelectList in .NET MVC application 1 35
jquery + C#.net radiobuttonlist 3 46
Unlocking a column in excel using C# 17 28
"The resource cannot be found" 1 24
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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