admin管理员组

文章数量:1415484

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.

本文标签: javascriptHow to pass Special Character in query string using aspnet and jqueryStack Overflow