Validating date range in asp net
Lets say you have two applications, one Desktop and one Web, then both can share the Validation Project instead of repeating the code in both application for the same "View"/"Screen".Because the Id field corresponds to an Identity column, you don't want to allow users to enter a value for this field.If you submit the form for creating a Product and you do not enter values for the required fields, then the validation error messages in Figure 3 are displayed.In this tutorial, you learn how to use the Data Annotation validators to perform validation in an ASP. The advantage of using the Data Annotation validators is that they enable you to perform validation simply by adding one or more attributes – such as the Required or String Length attribute – to a class property. Listing 1: Models\The Product class illustrates how to use one additional attribute: the Display Name attribute.
Validating date range in asp net comments