Max Toro's answer was helpful, although I needed to specify additional parameters.
I changed the selector attribute to this:
public class RequiresParameterAttribute : ActionMethodSelectorAttribute { readonly string[] parameterName; public RequiresParameterAttribute(string[] parameterName) { this.parameterName = parameterName; } public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) {
And then it can be used as such:
[RequiresParameter(new string[] { "id", "id2", "id3" })] public ActionResult Index(int id, int id2, int id3) {
source share