I'm having an XForm on a block and I want it to post to a specific controller. I'm tring to use the XFormParameters-class and pass it to the PropertyFor-method, but the controller-part of the form action attribute is not changed as specified by the parameters but the other parameters are included in the action.
I'm having an XForm on a block and I want it to post to a specific controller. I'm tring to use the XFormParameters-class and pass it to the PropertyFor-method, but the controller-part of the form action attribute is not changed as specified by the parameters but the other parameters are included in the action.
I specify XFormParameters like this:
viewModel.FormParameters = new XFormParameters()
{
PostAction = currentBlock.PostAction,
FailedAction = currentBlock.FailedAction,
SuccessAction = currentBlock.SuccessAction,
PostController = currentBlock.PostController
};
and render the xform like this:
@Html.PropertyFor(x => x.CurrentBlock.Form, Model.FormParameters);
Should it be done some other way?