1. Home
  2. Computing & Technology
  3. Delphi Programming

Enabling Cassini to use Client-Side Validation in ASP.NET

By , About.com Guide

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 <webControls clientScriptsLocation="/aspnet_client/{0}/{1}/"/> element.

Here are the steps to be done to enable using WebUIValidation.js with Cassini:

  1. Create a sub-folder in the project's main folder called "aspnet_client".
  2. Copy WebUIValidation.js from the aspnet_client virtual directory into your applications's aspnet_client folder
  3. Add this entry "<webControls clientScriptsLocation="aspnet_client/"/> " to web.config
Now you can debug ASP.NET applications that use client-side validation from Web Server Validator controls using Cassini.

Delphi tips navigator:
» How to Split and Merge Files using Delphi code
« How to Sort a TListView Delphi component

More Delphi Programming Quick Tips
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2005 Delphi Tips
  7. Enabling Cassini to use Client-Side Validation in ASP.NET

©2009 About.com, a part of The New York Times Company.

All rights reserved.