title: Querystring containing `+` evaluating to space?
body: <p>I have a parameter which I am passing as <code>querystring</code> to the page <code>URL</code>.Before passing the value as <code>querystring</code> I am encrypting the value. However the encrypted value sometimes contains the <code>+</code> in the <code>querystring</code>. I know it has special meaning in the <code>URL</code>. So I used <code>Server.UrlEncode(encryptedvalue)</code> to make it safe. But however when I get the <code>Querystring</code> only the <code>+</code> is getting evaluated before decoding the <code>URL</code>.</p>
  
  <p>Here is code to Generate the query-string,</p>
  
  <pre><code>var result =  Server.UrlEncode(this.UserSecurity.Encrypt&lt;string&gt;(value));
  </code></pre>
  
  <p>after this value of querystring(result) is <code>+</code> becomes <code>%2b</code> as expected</p>
  
  <pre><code>querystringvalue = "R3oQCPn%2bNVV4P0aL0LAZEL6Og1%2bQ2vOJJDJCSTY6WXE%3d"
  </code></pre>
  
  <p>I have No control over <code>Encryption</code> method so I can not change in there.</p>
  
  <p>So when I access at the redirected page I get,</p>
  
  <p>1) When I don't use <code>UrlDecode</code> then <code>+</code> becomes <code></code></p>
  
  <pre><code>  querystringvalue = "R3oQCPn NVV4P0aL0LAZEL6Og1 Q2vOJJDJCSTY6WXE="
  </code></pre>
  
  <p>2) When I use the <code>UrlDecode</code> then still <code>+</code> becomes <code></code></p>
  
  <pre><code>  querystringvalue = "R3oQCPn NVV4P0aL0LAZEL6Og1 Q2vOJJDJCSTY6WXE="
  </code></pre>
  
  <p>3) When I see in watch window here is strange thing I see,
   <img src="https://i.stack.imgur.com/hcU7k.png" alt="enter image description here"></p>
  
  <p>As you can see there is <code>+</code> present in querystring but it getting resolved to <code></code>.</p>
  
  <p>So my question is,</p>
  
  <p>1) Why the <code>%3d</code> not resolved to the <code>=</code> but the <code>%2b</code> resolved to <code>+</code> ?<br>
  2) And what Can I do to resolve this issue ? Because the <code>%2b</code> resolving to <code>+</code> and then to <code></code> giving me wrong decrypted value and some times format exception.</p>
  
  <p><strong>UPDATE</strong>
  After generating the <code>result</code> I am directly attaching it to the URL without any further process as <code>"page.aspx?taskid="+result</code> </p>