La Développement une vie une Passion

Archive for avril, 2017

APS.MVC Server sideValidating User Input with Data Annotations

Posted by abaze17 on 21st avril 2017

You can use data annotations in MVC models to

set validation criteria for user input. Input

validation is the process by which MVC checks

data provided by a user or a web request to

ensure that it is in the right format. The following

example shows a webpage form that collects

some information from the user:

o Name. This is required input. The user

must enter some data in this field.

o Height. This must be an integer between

0 and 400.

o Email Address. This is required input. The value entered must be a valid email address.

[Required(ErrorMessage=”Please enter a name.”)]

public string Name { get; set; }

Custom validation

exemple de validation

public class CheckValidYear : ValidationAttribute


public override bool IsValid(object value)


int year = (int)value;

if (year

Posted in ASP.NET MVC | No Comments »

Crystall report erreure : Could not load file or assembly ‘file:///C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise

Posted by abaze17 on 11th avril 2017

Could not load file or assembly ‘file:///C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll’ or one of its dependencies. The system cannot find the file specified.

Ce Message appaît le plus souvent quand nous avons ajouté  un état chrystal report dans la solution visual studio.

afin de le résoudre, il faut juste modifier le fichier de configuration (app.config/web.config

en ajoutant les balises de configuration suivantes



Posted in Uncategorized | No Comments »


Créer un Blog | Nouveaux blogs | Top Tags | 14 articles | blog Gratuit | Abus?