HI Vlad,
Even with "this", the error still appears, this time after the nested view has been loaded... the nested controller is:
public ActionResult Index(long campaignId, string containerId)
{
var profiles = m_profilesAPI.GetForCampaign(campaignId);
var pr = new Ext.Net.MVC.PartialViewResult(containerId, RenderMode.AddTo);
pr.ViewName = "sample";
return pr;
}
And the partial view is:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamimc>" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:FormPanel ID="ProfileDetails" IDMode="Predictable" runat="server" ButtonAlign="Right" AutoHeight="true"
Padding="5" Width="500" Border="false" Cls="transparent-panel" LabelWidth="150">
<Items>
<ext:DisplayField ID="ProfileId" runat="server" Text="Example" FieldLabel="Id"></ext:DisplayField>
</Items>
<Buttons>
<ext:Button ID="SaveButton" runat="server" Text="Confirm" Icon="Disk">
</ext:Button>
</Buttons>
</ext:FormPanel>
This is the response from the controller:
<script type="text/javascript">Ext.net.append(Ext.getBody(),["<div id=\"ID_ae24928824e645678622966ae5e50e2d_Content\" class=\"x-hidden\"><div id=\"ID_ae24928824e645678622966ae5e50e2d_UC_Profil eDetails_Container\">","</div></div>"].join(''));Ext.net.ResourceMgr.destroyCmp("ID_ae24 928824e645678622966ae5e50e2d");Ext.net.ResourceMgr .registerIcon(["Disk"]);new Ext.Panel({id:"ID_ae24928824e645678622966ae5e50e2d ",xtype:"panel",contentEl:"ID_ae24928824e645678622 966ae5e50e2d_Content",border:false,header:false}); new Ext.form.FormPanel({id:"ID_ae24928824e645678622966 ae5e50e2d_UC_ProfileDetails",labelWidth:150,cls:"t ransparent-panel",renderTo:"ID_ae24928824e645678622966ae5e50e 2d_UC_ProfileDetails_Container",autoHeight:true,wi dth:500,items:{id:"ID_ae24928824e645678622966ae5e5 0e2d_UC_ProfileId",xtype:"displayfield",fieldLabel :"Id",value:"Example"},border:false,buttons:[{id:"ID_ae24928824e645678622966ae5e50e2d_UC_SaveBu tton",iconCls:"icon-disk",text:"Confirm"}],padding:5,method:"POST",url:"/Profiles/?campaignId=1&containerId=ProfilesSummary"});Profi lesSummary.addAndDoLayout(ID_ae24928824e6456786229 66ae5e50e2d);</script>
Nothing appears and I get the usual "ProfilesSummary is not defined", probably coming from the last line:
ProfilesSummary.addAndDoLayout(ID_ae24928824e64567 8622966ae5e50e2d);
Honestly I could not find a reason for this, since the ProfilesSummary panel is created (as in the previous response) and rendered no problem... indeed if I change to return "this.body.id" for the Panel and then use RenderMode.RenderTo rather than AddTo, everything works...