472,106 Members | 1,233 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,106 software developers and data experts.

URLencode a URL Query string

Hello All,
from my C# dialog based application I am creating a URL that has some
query string parameters that I want to URL encode, the URLEncode function is
suppose to be in the HttpUtility class under System.Web but I cannot seem to
find it, is there an alternate to encode a URL query string in C#?

Imran.
Nov 17 '05 #1
2 38032
Did u add reference to system.web.assembly
System.Web.HttpUtility.UrlEncode
Theres some discussion on this at this link try
http://www.experts-exchange.com/Prog..._21044897.html

Shivprasad Koirala
C# , VB.NET , SQL SERVER , ASP.NET Interview Questions
http://www.geocities.com/dotnetinterviews/

Nov 17 '05 #2
HttpUtility is under System.Web, u have to include it in ur project..ie

using System.Web,

u also have to add the dll itself as a refernce into ur project..ie on the
Reference Folder (under the Solution explorer) right-click, add reference,
and its in the list.

once u do both steps, then u have access to HttpUtility.urlEncode()

Hope this helps

"Imran Aziz" wrote:
Hello All,
from my C# dialog based application I am creating a URL that has some
query string parameters that I want to URL encode, the URLEncode function is
suppose to be in the HttpUtility class under System.Web but I cannot seem to
find it, is there an alternate to encode a URL query string in C#?

Imran.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Joshua Beall | last post: by
22 posts views Thread by Fawke101 | last post: by
1 post views Thread by Jim | last post: by
3 posts views Thread by Russ | last post: by
5 posts views Thread by vtreddy | last post: by
reply views Thread by Darrel | last post: by
reply views Thread by Nathan Sokalski | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.