views:

17

answers:

1

In my javascript file I'm getting the content of a partial with the following call:

 $.ajax({
  type: "GET",
  url: value.href.replace(actionType, actionType + 'Partial'),
  dataType: "html",
  success: function(result) {
   $("#DepartmentsAction").html(result);
   alert(result);
  }
 });

Because the partial has the call Html.EnableClientValidation() the resulting html has a static script in it. In the result variable in the ajax call this script is present. In the page where the html gets inserted (#DepartmentsAction) the script has dissapeared.

What am I doing wrong?

A: 

Please look here for description and solution of this problem: http://tpeczek.blogspot.com/2010/04/making-aspnet-mvc-2-client-side.html

tpeczek