views:

30

answers:

1

Hi experts,

I have a view page with ajax.action link which returns a partial view from controller and render it to divid as updated target id.But I could not perform client side validation on that partial view.Can i have solution for it?

A: 

When you load a partial view's html with ajax it is normal for the JavaScript code not to be executed. Especially if you have calls to functions attached to onload event since this event is fired long before the ajax call is executed. Check out this article http://adammcraventech.wordpress.com/2010/06/11/asp-net-mvc2-ajax-executing-dynamically-loaded-javascript/ it describes all sorts of problems that you can have with this approach. If you want a more specific answer it will be good to proivide more info on your setup like - what version of .net/asp.net mvc you are using and what validation framework are you trying to use.

Branislav Abadjimarinov
Thank you for replay and that great article.
Chandra Prakash