Reputation: 2389
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.net and also from javascript.
Please help me out for the same. Thanks in advance.
Upvotes: 3
Views: 2667
Reputation: 356
When you pass value from Asp.net code behind use Server.UrlEncode(%20)
When you pass value from JavaScript use encodeURIComponent('%20')
(which will yield %2520
)
Upvotes: 5