I am loading a form onto a page via jquery ajax. Once loaded I was hoping that <%Html.EnableClientValidation(); %> would work as it normally does. It is not, and I am guessing that this is because the form has been added to the DOM after it was initially set, and the client-side validation scripts are not wired to hanlde "live" content.
Is this assumption correct? Is there a work-around?
I am using the following main scripts to handle client-side validation....
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
Note that I am not using...
<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
Although the inclusion of this script seems to make no difference.
Also note that I am placing the <%Html.EnableClientValidation(); %> above my form, and so that directive is loaded along with the form via the ajax call.