title: MVC3 Ajax.BeginForm with PartialView and persistent routedata issue
body: <p>I have a main view and the URL for this view has a Action/Controller/Area and id value, something like:</p>
  
  <p><a href="http://localhost:56513/Incident/IncidentHome/Index/8c02a647-a883-4d69-91be-7ac5f7b28ab7" rel="nofollow">http://localhost:56513/Incident/IncidentHome/Index/8c02a647-a883-4d69-91be-7ac5f7b28ab7</a></p>
  
  <p>I have a partialview in this main view, one that calls methods in the controller via Ajax.  This partial view needs to know the ID value of the url for the parent page.  I found how to do this is through 'ParentActionViewContent'.  Something like:</p>
  
  <pre><code>        using (Ajax.BeginForm("UpdatePersonalStatusPanel", "Status", new { area = "Tools" , id = ViewContext.ParentActionViewContext.RouteData.Values["id"].ToString() }, new AjaxOptions { UpdateTargetId = "divPersStatus" }))
          {
              &lt;p style="text-align: center;"&gt;
                  &lt;span class="editor-label"&gt;@Html.LabelFor(m =&gt; m.StatusText)&lt;/span&gt; &lt;span class="editor-field"&gt;@Html.EditorFor(m =&gt; m.StatusText)&lt;/span&gt;
                  &lt;input type="submit" value="Change Current Status" /&gt;
              &lt;/p&gt;
          }
  </code></pre>
  
  <p>Now, this works fantastic for calling the controller method.  The ID is passed correctly so that the controller can then see it in the routedata.  I use the id to perform a database call, and then return the partialview again.  The problem is on the return.  I get a 'Object reference not set to an instance of an object' on the ViewContext.ParentActionViewContext.RouteData.Values["id"].ToString() bit in the ajax.beginform , and my targetid doesn't refresh.  </p>
  
  <p>Clearly I must be doing something wrong.  Does someone else have a better way to see the parent view's routedata through Ajax?  </p>