@using (Html.BeginForm(null, null, FormMethod.Post, new { name = "myForm", id = "myForm" }))
{
@Html.Hidden("ConsumerServiceAndPeriod.OriginalEndHour", Model.ConsumerServiceAndPeriod.ServiceAndPeriod.EndHour)
@Html.Hidden("ConsumerServiceAndPeriod.OriginalEndMinute",
@Model.ConsumerServiceAndPeriod.ServiceAndPeriod.EndMinute)
@Model.ConsumerServiceAndPeriod.ServiceAndPeriod.EndMinute)
@Html.Hidden("ConsumerServiceAndPeriod.PayCycleStartDate", Model.PayCycleBeginDate.ToShortDateString())
}
in that code need to assign action method dynamically,now code can only redirect on create i want also on edit action method.
Thanks in advance

Manoj BhoirPosted Apr 14, 2015, 12:43 PM
I think you can achieve this by overriding the
DefaultControllerFactory.http://www.codeproject.com/Tips/732449/Understanding-and-Extending-Controller-Factory-i
For more details check this link :http://stackoverflow.com/questions/3303801/how-to-achieve-a-dynamic-controller-and-action-method-in-asp-net-mvc