Sunday, February 01, 2004 - Posts

Code Tip: Manually Setting the Path to WebUIValidation.js

We're currently working on a web project where we were forced to distribute aspnet_client for validation because one version of the project runs within Cassini web server. Hence there would be an exception when trying to find WebUIValidation.js using the default location. The default location is always in the web root and we needed it to be a directory within the actual application. After much searching and coming up with nothing I decided to analyze machine.config and found where the path is set. Eventhough, it's not documented I decided to throw the same tag into the Web.Config for the application (changing the path to what i needed) and behold - it worked.

So here is what it came down to:

<system.web>

<webControls clientScriptsLocation="aspnet_client/system_web/1_1_4322/"/>

</system.web>

Hope this helps out someone some day.