dba123
asked on
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.UrlEncod e(myURL);
The System.Web assembly is obviously included in this non-web project also...so what the heck?
When I try the following statement it tries to suggest the namespace Microsoft.SQLServer.Server
Server.UrlEncode(myURL);
I try this but it also does not recognize "Server"
System.Web.Server.UrlEncod
The System.Web assembly is obviously included in this non-web project also...so what the heck?
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.