Feb 01, 2013, 6:58 AM
Partial Views loaded through ajax request and issues with resource manager
Hi,
As newbie to ext.net (worked until now with kendo), I'm trying to load partial Views with Ext.net items using
an ajax request. The view is rendered but I can't resolve the following problems :
- If the resourceManager is included into the view everything works fine but as I close this view, the boundlist I use remains in the <body>. So as I reload the partial View I have multiple boundlist with same id and nothing works.
- If the resource manager is placed in the body, nothing works.
The PartialView is rendered as PartialViewResult and contains multiple Html.RenderPartial and those work fine with the resource manager (if it's placed in the partial View), but the partial View itself is loaded through an ajax request and it can't be different because action changes...
Am I missing something ?
The ajax request :
As newbie to ext.net (worked until now with kendo), I'm trying to load partial Views with Ext.net items using
an ajax request. The view is rendered but I can't resolve the following problems :
- If the resourceManager is included into the view everything works fine but as I close this view, the boundlist I use remains in the <body>. So as I reload the partial View I have multiple boundlist with same id and nothing works.
- If the resource manager is placed in the body, nothing works.
The PartialView is rendered as PartialViewResult and contains multiple Html.RenderPartial and those work fine with the resource manager (if it's placed in the partial View), but the partial View itself is loaded through an ajax request and it can't be different because action changes...
Am I missing something ?
The ajax request :
$.ajax({
type: "POST",
url: action, // action is variable
async: true,
cache: false,
beforeSend: function () {
$("#etat_window").data("kendoWindow").open().center().toFront();
$("#etat_window").data("kendoWindow").content("<div style=\"text-align:center\"><img src='/Images/22x22/loading.gif' style=\"padding-right:3px\" width=\"15\" height=\"15\"></div>");
},
success: function (data) {
$("#etat_window").empty();
$("#etat_window").data("kendoWindow").content($(data));
}
});
The Partial View requested through the ajax call looks like:<div>
@Html.X().ResourceManager().CleanResourceUrl(false)
@Html.RenderPartial("Ext_date_picker");
@Html.RenderPartial("Ext_combobox");
</div>
Thanks for any help.