Hi x_com
I have done that but result is same. I have lost the '+' sign from request.querystring
Main Topics
Browse All TopicsHi
I am getting value from request.querystring and the value is in the format ABC + CDE
but when I debug it I am getting value like ABC CDE
then I used HttpUtility.UrlEncoding().
How can I get the exact value
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I've created a test case and it is displaying the expected result.
private void test(){
string s;
string str ;
str = "bla bla bla bla"
s = HttpUtility.UrlEncode("htt
Response.Write(s);
Response.Write("<br><br>");
Response.Write(HttpUtility
}
Can you post some of your existing applied code and see how to tweak the problem?
Hi,
If i use str = "bla+ bla+ bla+ bla",
this is the output:
Input: http%3a%2f%2furl.com%3fP%3
Output: http://url.com?P=bla+ bla+ bla+ bla
It is displaying the initial input as expected for "str" variable. Please provide more details.
Hi
Sorry I can't post code . You can try by making a simple application in which you can create 2 webpages.
On webpages you can redirect to second page
for example there are 2 pages Page1.aspx and Page2.aspx.
On page load of the Page1.aspx write this
Response.Redirect("Pag
On Page load of Page2.aspx
see the value of
Request.QueryString("test"
Please let me know if you need more details.
Hi,
Ok, this is so odd. I've tested in vb.net, it is returning the expected using proposed. If you running the code in c# environment, you need to replace "+" with "%2b". Then, you need to convert the "%2b" into "+" after decode the passed parameter.
eg:
P1.aspx
=========
Response.Redirect("p2.aspx
P2.aspx
=========
Response.Write("P=" + HttpUtility.UrlDecode(Requ
You need to decode the html content. Depending on whetehr you want to do it in VB code or in SQL:-
SQL - have a look at the decode function shown here - http://www.thedivingclub.c
VB - you need to use System.Web.HttpUtility.HTM
Cheers
Gupta GOli
Business Accounts
Answer for Membership
by: x_comPosted on 2009-08-24 at 03:13:28ID: 25166856
Hi KaranGupta,
You can use HttpUtility.URLEncode() to encode the passed parameter. Then, read the encoded parameter via HttpUtility.URLDecode()