views:

244

answers:

1

I have started to play with xVal as my validation framework for an ASP.Net MVC application. I use the Spring.Net IoC container to hold the app together.

I have followed the instructions on Steve Sanderson's blog to get server side validation working fine. But when I try to get client side working, I get the following runtime exception:

Spring.Objects.Factory.NoSuchObjectDefinitionException was unhandled by user code

Message="No object named 'Scripts' is defined : Cannot find definition for object [Scripts]"

I presume this is because the Site.Masterpage has the following code in it:

<script type="text/javascript" src="<%= ResolveUrl("~/Scripts/jquery-1.2.6.js")%>"></script>
<script type="text/javascript" src="<%= ResolveUrl("~/Scripts/jquery.validate.js")%>"></script>
<script type="text/javascript" src="<%= ResolveUrl("~/Scripts/xVal.jquery.validate.js")%>"></script>

Which is trying to resolve ~/Scripts/ using Spring.

How do I get either Spring to cope with this (i.e. what goes into the config XML), or what do I change in Site.Master so this does not happen?

A: 

Opps, with Steve's help I found the answer. Don't blindly copy and paste samples from the web, I have jquery-1.3.2.js in my scripts folder, not 1.2.6. By changing the reference in the Site.Master file to be the correct version number, it all started working.

Colin Desmond