title: Asp.Net Mvc 2 - RenderAction List with a create
body: <p>First, I use Asp.Net MVC 2 RC 2.</p>
  
  <p>What I want to do is to list a comment view and below this view being able to add comment (with validations). For example, something like when you add comment in stackoverflow. Except that my page should work with or without javascript enabled.</p>
  
  <p>So to solve that problem I use the new RenderAction and it partially solved my problem. I got my list view that calls my addcomment usercontrol with RenderAction.</p>
  
  <p>The validations work. My problem occurs when I try to add a comment that it's valid. The page didn't refresh correctly. If I got in the database, my comment is added, but it's doesn't have been refresh in my list view and the add comment form isn't clear.</p>
  
  <p>I think it's because of how the workflow is rendered.</p>
  
  <p>Maybe if someone got a example or blog about this, it's can help me to get it right...</p>
  
  <p>At the bottom of my Comment/List.aspx</p>
  
  <pre><code>&lt;% Html.RenderAction("Create", "Comment"); %&gt;
  </code></pre>
  
  <p>In Comment/Create.ascx</p>
  
  <pre><code>&lt;% using (Html.BeginForm(
         ViewContext.ParentActionViewContext.RouteData
             .Values["action"].ToString(),
         ViewContext.ParentActionViewContext.RouteData
             .Values["controller"].ToString(), 
         FormMethod.Post, new { id = "createForm" })){ %&gt;
  </code></pre>