javascript - How to pass Special Character in query string using asp.net and jquery? - Stack Overflow

I wanna pass %20 in Query string. But in code behind it will considered as space in code behind. How ca

I wanna pass %20 in Query string. But in code behind it will considered as space in code behind.

How can i do that?

I am passing querystring using asp and also from javascript.

Please help me out for the same. Thanks in advance.

I wanna pass %20 in Query string. But in code behind it will considered as space in code behind.

How can i do that?

I am passing querystring using asp and also from javascript.

Please help me out for the same. Thanks in advance.

Share Improve this question edited Feb 18, 2014 at 7:01 Rikesh 26.5k14 gold badges82 silver badges89 bronze badges asked Dec 19, 2013 at 11:59 AB VyasAB Vyas 2,3896 gold badges26 silver badges43 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

When you pass value from Asp code behind use Server.UrlEncode(%20)

When you pass value from JavaScript use encodeURIComponent('%20') (which will yield %2520)

Pass %2520 to escape your %, that's how.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745233760a4617791.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信