Asp net page not validating phone dating in

14-Oct-2016 01:35

In our example, we knew we only had one additional legal value – the value “4”.We need to call Register For Event Validation for every legal value the control might postback.An alternate solution would be to build our own control.A crucial step in the code is to add the Supports Event Validation attribute to the class.

The runtime does not validate events for controls that do not have the Supports Event Validation attribute present, nor does the runtime does look at the custom attributes of the control’s base class.Pros: Easy to do Cons: Less secure Bertrand Le Roy wrote a post back in 2004: “Please, please, please, learn about injection attacks! Event validation is a feature designed to help prevent injection attacks (of course it can't prevent attacks all by itself).