title: Create RouteValueDictionary on server and use in aspx?
body: <p>I am tring to pass a <code>RouteValueDictionary</code> to my aspx so that I can use it as the parameters for an <code>Ajax.BeginForm</code> method.  I load it up like so:</p>
  
  <pre><code> RouteValues = new System.Web.Routing.RouteValueDictionary();
  
   RouteValues.Add("FindingId", thisFinding.Id);
   RouteValues.Add("ReportId", thisFinding.ReportSection.ReportId);
  </code></pre>
  
  <p>and then add it to my model without issue. When I put it as the parameter to the <code>BeginForm</code> method it renders the action as this:</p>
  
  <pre><code>/SolidWaste/Finding/LoadSection?Count=3&amp;Keys=System.Collections.Generic.Dictionary%602%2BKeyCollection%5BSystem.String%2CSystem.Object%5D&amp;Values=System.Collections.Generic.Dictionary%602%2BValueCollection%5BSystem.String%2CSystem.Object%5D
  </code></pre>
  
  <p>Here is the aspx code:</p>
  
  <pre><code>(Ajax.BeginForm(Model.FormModel.Action,
      Model.FormModel.Controller, 
      Model.FormModel.RouteValues,
  new AjaxOptions {
      HttpMethod = "Post",
      InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,
      UpdateTargetId = "WindowContent",
  }, new { id = FormId })) { %&gt;
  &lt;input name="submit" type="submit" class="button" value="" style="float: right;"/&gt;
  &lt;%  } //End Form %&gt;
  </code></pre>
  
  <p>Here is the View Model that represents Model.FormModel</p>
  
  <pre><code>    public class FormViewModel {
  
      public string Action { get; set; }
  
      public string Controller { get; set; }
  
      public string Method { get; set; }
  
      public RouteValueDictionary RouteValues { get; set; }
  }
  </code></pre>
  
  <p>Any idea why it is not serializing the RouteValueDictionary into the proper URL on the action?  I would like to use an object here rather than build the RouteValues by hand with <code>new { field = vale }</code>  </p>