<p>
 Main Action
</p>

<% Html.BeginForm(); %>

 <div>
  Name: <%= Html.TextBox(“IndexName”) %>
 </div>
 <div>
  Value: <%= Html.TextBox(“IndexValue”) %>
 </div>
 
 <input type=”submit” value=”save” />

<% Html.EndForm(); %>

<%= Html.Action(“Custom”, new { title = “Test Title” }).ToHtmlString()%>

 

[HttpGet, ChildActionOnly]
public ActionResult Custom()
{
 return PartialView();
}

[HttpPost]
public ActionResult Custom(FormCollection form)
{
 return PartialView();
}

public ActionResult Index()
{
 return View();

 

 

 <p>
 Main Action
</p>

<form action=”/RenderingActions” method=”post”>

 <div>
  Name: <input id=”IndexName” name=”IndexName” type=”text” value=”” />
 </div>
 <div>
  Value: <input id=”IndexValue” name=”IndexValue” type=”text” value=”” />
 </div>
 
 <input type=”submit” value=”save” />

</form>

<p>
 Custom Action: Test Title
</p>
 
<form action=”/RenderingActions” method=”post”>
 
 <div>
  Name: <input id=”CustomName” name=”CustomName” type=”text” value=”” />
 </div>
 <div>
  Value: <input id=”CustomValue” name=”CustomValue” type=”text” value=”” />
 </div>
 
 <input type=”submit” value=”save” />
 
</form>