S
Stephen Costanzo
I have to translate a URL so that the parameters in the URL include the
'special' characters for the ?, & and other features.
I have looked at the HttpServerUtility.URLEncode function and it seems to be
the correct method to call to conduct this translation. However I cannot
figure out how to get it to work.
I have tried
HttpServerUtility translate;
translate = System.Web.HttpContext.Current.Server;
string htmlUrlEncoded = translate.UrlEncode(htmlCode);
without success. I know I need to somehow create an object to actually do
the translation, but I am not running a webserver on the development machine
(which is why the Current.Server is probably failing).
Does anyone have any ideas?
Thanks in advance.
'special' characters for the ?, & and other features.
I have looked at the HttpServerUtility.URLEncode function and it seems to be
the correct method to call to conduct this translation. However I cannot
figure out how to get it to work.
I have tried
HttpServerUtility translate;
translate = System.Web.HttpContext.Current.Server;
string htmlUrlEncoded = translate.UrlEncode(htmlCode);
without success. I know I need to somehow create an object to actually do
the translation, but I am not running a webserver on the development machine
(which is why the Current.Server is probably failing).
Does anyone have any ideas?
Thanks in advance.