Answered by:
Server.URLEncode not being recognized

Question
-
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);
C# Web DeveloperTuesday, June 17, 2008 5:53 PM
Answers
-
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, May 10, 2012 7:44 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, May 10, 2012 7:44 AM
Thursday, May 10, 2012 7:44 AM
All replies
-
System.Web namespace does not have a Server class. You should not complain.
AlexBTuesday, June 17, 2008 6:37 PM -
what are you talking about?
http://forums.msdn.microsoft.com/en/csharpgeneral/thread/392f5287-61cb-4a04-a2ca-95830d80292c/
and I should not complain....hehe, veryf funny. That's just a weird ____ comment man.
C# Web Developer- Edited by NoEgo Tuesday, June 17, 2008 6:48 PM weird
Tuesday, June 17, 2008 6:47 PM -
Good God, maybe it would help if I had the frigging reference in my non-web project? problem solved. Forgot this is not a web project so needed to include the damn System.Web.
C# Web DeveloperTuesday, June 17, 2008 6:51 PM -
nevermind, problem NOT resolved. I was looking at a the wrong project. System.Web is in there. So still not sure what the problem is here.
C# Web DeveloperTuesday, June 17, 2008 6:58 PM -
Looks like you have to use in a non-web project??
HttpUtility
.UrlEncode
C# Web Developer- Edited by NoEgo Tuesday, June 17, 2008 7:15 PM I don't wany to give a reason
Tuesday, June 17, 2008 7:15 PM -
NoEgo said:
what are you talking about?
http://forums.msdn.microsoft.com/en/csharpgeneral/thread/392f5287-61cb-4a04-a2ca-95830d80292c/
and I should not complain....hehe, veryf funny. That's just a weird ____ comment man.
C# Web Developer
Comment what? You gave me a recursive link. Click on it to see what you are doing. System.Web DOES NOT have Server Class.
AlexBTuesday, June 17, 2008 8:21 PM -
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, May 10, 2012 7:44 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, May 10, 2012 7:44 AM
Thursday, May 10, 2012 7:44 AM