Sep 11, 2015, 4:02 PM
[CLOSED] Loading Panel content from DirectMethod
Hi,
Please suggest how to load Panel content correctly from a Direct Method if it's possible. I'm getting a client side error doing it as below. Here's my test case:
Please suggest how to load Panel content correctly from a Direct Method if it's possible. I'm getting a client side error doing it as below. Here's my test case:
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
}
}
[DirectMethod]
public void LoadContent(string url)
{
this.Panel1.SuspendScripting();
this.Panel1.ClearContent();
this.Panel1.RemoveAll(true);
this.Panel1.Loader = new ComponentLoader();
this.Panel1.Loader.Url = url;
this.Panel1.Loader.Mode = LoadMode.Frame;
this.Panel1.Loader.DisableCaching = true;
this.Panel1.Loader.LoadMask.ShowMask = true;
this.Panel1.Loader.LoadMask.Msg = "Loading it...";
this.Panel1.Loader.MonitorComplete = false;
this.Panel1.LoadContent();
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Ext.NET Examples</title>
<script>
var loadContent = function () {
var url = "Child.aspx";
App.Panel1.clearContent();
X.LoadContent(url, {
eventMask: { showMask: false },
success: function () {
}
});
};
</script>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="X" />
<ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
<Items>
<ext:Panel ID="Panel1" runat="server" Icon="Book" Title="Ext.Net">
<BottomBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="Load Content" Icon="Application">
<Listeners>
<Click Fn="loadContent" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</BottomBar>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Sep 14, 2015 at 2:11 PM.
Reason: [CLOSED]