最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论