title: How do I route a URL with a querystring in ASP.NET MVC?
body: <p>I'm trying to setup a custom route in MVC to take a URL from another system in the following format:</p>
  
  <p><code>../ABC/ABC01?Key=123&amp;Group=456</code></p>
  
  <p>The 01 after the second ABC is a step number this will change and the Key and Group parameters will change. I need to route this to one action in a controller with the step number key and group as paramters. I've attempted the following code however it throws an exception:</p>
  
  <p>Code:</p>
  
  <pre><code>routes.MapRoute(
      "OpenCase", 
      "ABC/ABC{stepNo}?Key={key}&amp;Group={group}",
      new {controller = "ABC1", action = "OpenCase"}
  );
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>`The route URL cannot start with a '/' or '~' character and it cannot contain a '?' character.`
  </code></pre>