Last post Jul 13, 2009 05:33 AM by alaa9jo
Jul 10, 2009 05:14 AM|IvanKononenko|LINK
I have a following problem.
My site have some links which contains symbol *.
For example www.mysite.com/search.aspx?price=10*20.
But I can't process this url in my code because it immediately return me an error with 400 error code.
Is it possible to fix it?
Jul 11, 2009 08:05 PM|rtpHarry|LINK
Yes you are correct, some characters are forbidden to be used in URLs. You can get around this by url encoding the data.
Doing something like this would turn & into &
Its built into the .net system.web namespace - check this out for an example:
Jul 12, 2009 03:39 AM|Deeno20|LINK
u can send price=10*20 using session if it data or valu
it will solved ur problem
Jul 12, 2009 06:37 AM|alaa9jo|LINK
You can use Server.UrlEncode(urltoEncode as string),it will return encoded url.
Jul 13, 2009 05:10 AM|IvanKononenko|LINK
Jul 13, 2009 05:33 AM|alaa9jo|LINK
* is not one of those forbidden characters in urls,so i think the url is not correct.Would you check on it if it's correct?