This project is read-only.
To use ElValWeb you need install Enterprise Library 5.0

To nable client validation with ElValWeb you must do the following.

First you should add following line in Application_Start in Global.asax.cs file

protected void Application_Start() {
 ModelValidatorProviders.Providers.Add(new EntLibValidatorProvider());

After that you need add refferences to scripts on the page on wich you want and enable clients-side validation.
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script>
    <script src="../../Scripts/Elvalweb-0.0.1.js" type="text/javascript"></script>
    <% Html.EnableClientValidation(); %>
This code should appear before
    <% using (Html.BeginForm()) {%> 

The last step is configuring validation using standart Enterprise Library Validation tool, to satisfy your needs.

Last edited May 1, 2010 at 8:10 PM by alexerv, version 2


No comments yet.