MVC2 Client-Side Validation for injected Ajax content

Posted by radu-negrila on Stack Overflow See other posts from Stack Overflow or by radu-negrila
Published on 2010-05-18T13:17:21Z Indexed on 2010/05/21 15:20 UTC
Read the original article Hit count: 542

Hi,

I am making an Ajax call and adding content to a form inside a MVC2 app. I need to update the Client Validation Metadata with the validation for my new content.

 <script type="text/javascript"> 
//<![CDATA[
if (!window.mvcClientValidationMetadata) { window.mvcClientValidationMetadata = []; }
window.mvcClientValidationMetadata.push({"Fields":[{"
...
</script>

Is there a way to generate this metadata for a partial view ?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about client-side

Related posts about validation