Mega Code Archive

 
Categories / Delphi / .NET
 

Enabling Cassini to use Client Side Validation in ASP.NET

Title: Enabling Cassini to use Client-Side Validation in ASP.NET When using Cassini to debug ASP.NET applications you might encounter some problems due to Cassini's "limitations". Cassini does not support the same folder structure of IIS, as it can only access files in the web applications main directory and sub directories. This limitation causes problems when using validation controls on a web form. The WebUIValidation.js JavaScript file ASP.NET validation controls use, is located, by default, in an IIS virtual directory called aspnet_client - and therefore is NOT accessible by Cassini. The location of the WebUIValidation.js is defined by an entry in the machine.config file with the element. Here are the steps to be done to enable using WebUIValidation.js with Cassini: Create a sub-folder in the project's main folder called "aspnet_client". Copy WebUIValidation.js from the aspnet_client virtual directory into your applications's aspnet_client folder Add this entry " " to web.config Now you can debug ASP.NET applications that use client-side validation from Web Server Validator controls using Cassini.