开发者

encoding url in web.config

开发者 https://www.devze.com 2023-01-16 05:15 出处:网络
I have a url that I would like to put into my web.config file. http://google.com?parcel&bob&&smith

I have a url that I would like to put into my web.config file.

http://google.com?parcel&bob&&smith

I imagine that the .net run time is upset with the ampersand's so i encoded them to be &amp.

http://google.com?parcel&ampbob&amp&ampsmith

This also doesn't work. Any ideas would be great, if you could supply 开发者_Python百科a link to the documentation of why this is that would be even better. Thank you very much!!!


did you try this? (semicolons)

http://google.com?parcel&bob&smith


The proper encoding for the ampersand is & You are missing the ; at the end.


I guess that is because you are missing the ';'. Try to use the HttpUtility.HtmlEncode method for encoding....

0

精彩评论

暂无评论...
验证码 换一张
取 消