title: How to check url contains query string or not
body: <p>I want to check whether the url has querystring values <code>?</code> or not. </p>
  
  <p>If query string value is not present, if it's a plain url, it should redirect to some other page, so that if somebody accesses the page directly they should be redirected to some other page</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (string.IsNullOrWhiteSpace(Request.QueryString["aspxerrorpath"]))
      {
          uniqueid = Request.QueryString["val"];
      }
      else
      {
          Response.Redirect("proformainvoice.aspx");
      }
  
      if (!Page.IsPostBack)
      {
          fillproformadata();
      }
  }
  </code></pre>