Jun 13, 2013, 12:35 PM
[CLOSED] MVC - Loading UserControl's with PartialViewResult
Hi @all,
I load on clientside with jscript UserControls in Asp - Repeater.
Here some code snippets to understand the situation.
.js
If I build a ext:Panel around the asp-div, it works too!
.ascx
Thanks!
I load on clientside with jscript UserControls in Asp - Repeater.
Here some code snippets to understand the situation.
.js
var p_new_item = new Ext.Panel({
id: name_control,
layout: 'fit',
border: false
});
var p_loader = new Ext.Panel({
id: name_loader,
border: false,
hidden: true,
loader: {
url: url,
disableCaching: true,
scripts: true,
params: {
containerId: p_new_item.id,
contSID: contSID
}
}
});
p_list.add(p_loader);
p_list.add(p_new_item);
.Controller.cspublic ActionResult uc_ContText(string containerId, string contSID)
{
this.ViewData["contSID"] = contSID;
var pr = new Ext.Net.MVC.PartialViewResult(containerId);
pr.ViewData = ViewData;
pr.RenderMode = Ext.Net.RenderMode.AddTo;
pr.SingleControl = true;
pr.IDMode = Ext.Net.IDMode.Explicit;
return pr;
}
That works with a UserControl (.ascx) which was developed with Ext.Net but not with UserControl with Asp-Code.If I build a ext:Panel around the asp-div, it works too!
.ascx
<ext:Panel runat="server">
<Content>
<div>
//My UserContol.....
</div>
</Content>
</ext:Panel>
How I can Asp-UserControls load without Ext.Net -Code ??Thanks!
Last edited by Daniil; Jun 18, 2013 at 4:01 AM.
Reason: [CLOSED]