title: MVC url routing key value pairs parameters
body: <p>I know that I can create a url mapping that supports this url</p>
  
  <p>user / idex / <strong>userId</strong> / 1 / <strong>categoryId</strong> / abc</p>
  
  <pre><code>ActionResult Index (String userId, String categoryID)
  </code></pre>
  
  <p><strong>What I wonder is whether it is possible to generalize this mechanism and write a single mapping that can support all url-based parameters passed as key / value pairs.</strong></p>
  
  <p><strong>controller / action / *<em>key1</strong> / value1 / <strong>key2</strong> / value2 ....</em>*</p>
  
  <p>With a single mapping I need to supported for example all these url</p>
  
  <p>user / idex / userId / 1 / categoryId / abc</p>
  
  <pre><code>ActionResult Index (String userId, String categoryID)
  </code></pre>
  
  <p>category / idex / <strong>catId</strong> / 1 / <strong>groupId</strong> / 2</p>
  
  <pre><code>ActionResult Index (catId String, String groupId)
  </code></pre>
  
  <p>category / idex / <strong>catId</strong> / 1 / <strong>groupId</strong> / 2</p>
  
  <pre><code>ActionResult Index (catId String, String groupId)
  </code></pre>
  
  <p>news / detail  / <strong>newsId</strong> / 1 / <strong>groupId</strong> / 2 / <strong>option</strong> / 3</p>
  
  <pre><code>ActionResult Index (newsid String, String groupId, String optionId)
  </code></pre>