How to validate the value of a parameter in the routes?

0

I am programming in asp mvc with c # and I have an action declared as follows:
public FileResult ViewImage(int ImageFileItemId, int MaxWidth, int MaxHeight, bool FixedWidthHeight, string JpegQuality) .
I would like to validate that the parameter FixedWidthHeight It is mandatory true or false and if not, do not find me the action and that does not leave an error as error param value . I've heard that with the parameter constrains you can validate that but how?

    
asked by Jonathan Fuentes 02.07.2018 в 17:49
source

0 answers