title: How do I convert an object to a RouteValueDictionary inside an Action?
body: <p>I need to be able to pass multiple parameters if needed into an action. They will ultimately be passed into a second action which will know the details (how many, what they are called) but my first action does not need to know this, it just needs to pass them on.  So I call the first action like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>RedirectToAction("Action1", "Controller1", new {
                       dcontroller = "Controller2",
                       daction = "Action2",
                       dparameters = new { tabSelected = "1" }
                   })
  </code></pre>
  
  <p>and <code>dparameters</code> gets passed, but when I get into the action that needs to use the parameters I can't get at them. The object looks like this:</p>
  
  <pre><code>... dparameters [string[1]}
   [0]"{ tabSelected = 1 }"
  </code></pre>
  
  <p>but if I try <code>dparameters[0]</code> I get the error</p>
  
  <blockquote>
    <p><code>Cannot apply indexing with [] to an expression of type 'object'.</code></p>
  </blockquote>
  
  <p>I also tried</p>
  
  <pre class="lang-cs prettyprint-override"><code>RouteValueDictionary p = new RouteValueDictionary(dparameters);
  </code></pre>
  
  <p>which created a p with 7 Key / item pairs, <code>p.Key[3] = SyncRoot</code>, <code>p.Value[3] = string[1]</code> and I'm back to the same issue.</p>