Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:45:26+00:00 2026-05-24T01:45:26+00:00

I have a webapp created using C# and asp.net. I placed a parameter value

  • 0

I have a webapp created using C# and asp.net. I placed a parameter value in the querystring with a plus(+) sign. But the plus sign disappear.

How can I include the plus sign(+) in the query string without disappearing?

Please advise.

Thanks.

Edit: added code with UrlEncode

string str = Server.UrlEncode(Requery.QueryString["new"]);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:45:27+00:00Added an answer on May 24, 2026 at 1:45 am

    + sign has a semantic meaning in the query string. It is used to represent a space. Another character that has semantic importance in the query string is & which is used to separate the various var=value pairs in the query string.

    Most server side scripts would decode the query parameters before using them, so that a + gets properly converted to a space. Now, if you want a literal + to be present in the query string, you need to specify %2B instead.

    + sign in the query string is URL-decoded to a space. %2B in the query string is URL-decoded to a + sign.

    See the difference between

    http://www.google.com/search?q=foo+bar

    and

    http://www.google.com/search?q=foo%2Bbar

    In the above examples, Google’s server script is URL-decoding the query parameters and then using them to do the search.

    URL-encoding is nothing but % sign followed by the hex-code of the special character. For example, we know that the hex code of A is 0x41 (decimal: 65). Try this:

    http://www.google.com/search?q=%41

    Hope this makes URL-encoding clear.

    So, if you want the + sign to be preserved when a JavaScript is fetching a URL with + signs in its query parameters and a server side script would process the query parameters after URL-decoding it, you should URL-encode the query parameters in the URL before using issuing the HTTP get request so that all + signs are converted to %2B‘s when the request reaches the server side script. Now when the server side script URL-decodes the query string, all %2B‘s gets converted back to + signs which is what you want.

    See Encode URL in JavaScript? to learn how to URL-encode the parameters using JavaScript. Short answer from the discussion there:

    var encodedURL = "http://example.com/foo.php?var=" + encodeURIComponent(param);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started to make a webapp with asp.net mvc2. I am using the
I have a asp.net webapp and I am using Jquery. I wanted to know
I am building an asp.net MVC2 web app using StructureMap. I have created a
I have created a webapp using maven2 archetype in netbeans 6.7. when I do
I have created a facebook application using FaceBook ToolKit for .Net, What I am
I have created an ASP.NET Webforms web application which basically inetracts with the code
I have created a webapp using all of the recommended link and meta tags
Briefly, here's the scenario. I have an ASP.NET application using forms authentication and a
I am developing a MySQL Web App using ASP.net and I have heard that
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.