Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

UrlEncode outside ASP. Net???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AspDotNetDvlpr - 15 Mar 2006 16:43 GMT
Hi,

I'm writing a console application that will be running as a scheduled
application, that basically sends out nag email messages to users of a web
application on a daily basis. It's going great so far, but I ran into a
problem that I can't figure out.

I need to use the UrlEncode method, that is usually available under ASP .Net
using Server.UrlEncode("text") , but when I try and use it in my console
application, after adding a reference to System.Web, and trying to create an
instance of the System.Web.HttpServerUtility class, which contains the
UrlEncode method, I get an error that Overload resolution failed because no
'New' is accessible. Normally, ASP .Net instantiates this as one of it's
intrinsic objects.

Anyone know if there is a way to use this method in a non ASP .Net
application, or if there is a different place with a similar method? I am
stumped at the moment. Thanks!
Vadym Stetsyak - 15 Mar 2006 17:08 GMT
Hello, AspDotNetDvlpr!

There is no need creating instance, use static methods

HttpUtility.UrlEncode/HttpUtility.UrlDecode

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
AspDotNetDvlpr - 15 Mar 2006 18:01 GMT
That did the trick Vadym, you are a great help, thank you!

> Hello, AspDotNetDvlpr!
>
[quoted text clipped - 5 lines]
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com 

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.