title: Empty QueryString parameter
body: <h3>The Problem</h3>
  <p>What is the proper way to check for the <code>foo</code> parameter in the following url's querystring using asp.net?  Is this even possible?</p>
  <pre><code>http://example.com?bar=3&amp;foo
  </code></pre>
  <p>I have tried checking <code>Request[&quot;foo&quot;]</code> as well as <code>Request.QueryString[&quot;foo&quot;]</code> and I get <code>null</code> for both.  I have also tried populating a <code>List</code> with the values from the <code>QueryString</code> collection but as I mention below, it does not include the value.</p>
  <h3>The Question</h3>
  <p>I understand that there is no value, but shouldn't <code>Request[&quot;foo&quot;]</code> return an empty string rather than <code>null</code>?  Is there a way to find out if a querystring key exists even if it has no value?</p>
  <h3>Notes</h3>
  <p>I found <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=377511" rel="noreferrer">here</a> that <code>Request.QueryString.AllKeys</code> includes <code>null</code> for blank querystring parameters.</p>
  <h3>[edit]</h3>
  <p>As stated below by <a href="https://stackoverflow.com/users/12725/james-curran">James</a> and <a href="https://stackoverflow.com/users/44084/dreas-grech">Dreas</a> a Regex to parse the raw url might be the best (and possibly only) approach.</p>
  <pre><code>Regex.IsMatch(Request.RawUrl, &quot;[?&amp;]thumb([&amp;=]|$)&quot;)
  </code></pre>