?
Solved

Can I call Server.UrlEncode from an executable?

Posted on 2007-12-04
2
Medium Priority
?
681 Views
Last Modified: 2012-06-27
I am writing an executable in C# that will send emails with links to my website.  In this executable I want to format the URLs and part of that is to encode the URL parameters.  However, I find that the Server.UrlEncode method is part of System.Web.HttpServerUtility and thus cannot be called from my executable.  It seems like there is no reason that UrlEncode is part of this library... is there a way I can call this method or an equivalent one in my executable?  Or will I have to disassemble the C# and copy out the implementation to my own methods?

Thanks for your help!
0
Comment
Question by:maltomeal8
[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 17

Accepted Solution

by:
Daniel Reynolds earned 500 total points
ID: 20406254
You can reference System.Web assembly in your Windows Forms project and call
the static method HttpUtility.UrlEncode() .
Calling this method doesn't require being run as a web page, you can call it
from a windows forms, console or service application.

see this link:
http://www.thescripts.com/forum/thread233425.html
0
 

Author Closing Comment

by:maltomeal8
ID: 31412673
That's exactly what I was looking for!  Thanks for your speedy reply!
0

Featured Post

Technology Partners: 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

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…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

777 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