Skip to content

Instantly share code, notes, and snippets.

@vgaltes
Created December 6, 2015 22:05
Show Gist options
  • Save vgaltes/78fdf17bace15e437e0d to your computer and use it in GitHub Desktop.
Save vgaltes/78fdf17bace15e437e0d to your computer and use it in GitHub Desktop.
Applying FillParameterFromActionName
[HttpPost]
[MultipleFormActionsButtonWithParameter(SubmitButtonActionName = "SpecifyIngredients")]
[FillParameterFromActionName(ParameterName = "ingredientIndex", ParameterType = TypeCode.Int32, SubmitButtonActionName = "SpecifyIngredients")]
public ActionResult UseIngredient(RecipeViewModel viewModel, int ingredientIndex)
{
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment