UPDATE - There are a lot of posts regarding the Child actions are not allowed to perform redirect actions on SO and ASP.NET forums. The
Try this for your modal:
<div class="modal hide fade in" id="myModal" )>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Modal header</h3>
</div>
@using (Html.BeginForm("Create", "Franchise", FormMethod.Post))
{
<div id="create_franchise_modal_body" class="modal-body">
@Html.RenderPartial("Create")
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
<button type="submit" class="btn btn-primary">Save changes</button>
</div>
}
</div>
And then in your controller, fix your GET method so it returns a partial view result
//
// GET: /Franchise/Create
public PartialViewResult Create(int FranchiseSetId)
{
ViewBag.PossibleFranchiseSets = franchisesetRepository.All;
var franchise = new Franchise { FranchiseSetId = FranchiseSetId };
return PartialView(franchise);
}
I've made a couple of assumptions in this fix.
@Html.Action("Create", "Franchise", new { FranchiseSetId = Model.FranchiseSetID })
you are wanting to render that partial viewIf I've missed something let me know and I'll update my answer to try and provide a better solution.