Reputation: 191
I have a view with including partial view (Partial view from different controller that call @{ Html.RenderAction("DebitHeadConfigure", "HeadDisplayConfigure");}
) now i need a action against Button click which button come from partial view
Note : Currently if i use submit type button then it call my main controller action
Upvotes: 1
Views: 1254
Reputation:
Problem isn't in your button, but in the form that you are submitting. Make sure that you specify action and controller in a form within your partial view.
For example:
@using (Html.BeginForm("ActionToCall", "ControllerContainingAction", FormMethod.POST)) {
<p>
My Form
</p>
}
References:
Upvotes: 3