views:

20

answers:

0

Hi,

normally i load a partial view by doing

<% Html.RenderPartial("MyPartialView", Model); %>

But how can i assign the Model to the corresponding action, when i instead use jQuery to load this partial view?

   $.ajax({
           url: "/MyUrl/",
           data: 'html',
           success: function (data) { $('#MyPartialView').html(data); }
       });

So it's calling the right Action, but the Model is missing. Because of design i don't want to initialize a new instance of my model within the action.

Is there a way to pass the model to the action via ajax?

Thanx in advance.