Load aspx page into <ext:Panel>
-
23-12-2019 - |
Question
I have two aspx page: Coba.aspx and Coba2.aspx. I want to load an aspx page into . The Page is load to the panel, but browser getting hang and I always have error like this in console:
Uncaught TypeError: Object prototype may only be an Object or null
Here Coba.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Coba.aspx.cs" Inherits="Coba" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
var nm = {
Add: function () {
var panel1 = Ext.getCmp('Panel1');
var child = {
xtype: 'panel',
layout: 'fit',
closable: true,
title: 'title',
autoLoad: {
showMask: true,
scripts: true,
mode: 'frame',
url: 'http://localhost:34573/CBC/Coba2.aspx'
}
};
panel1.add(child);
}
};
</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" DirectMethodNamespace="X" IDMode="Explicit" />
<ext:Viewport ID="Viewport1" runat="server">
<Items>
<ext:Button ID="Button" runat="server" Text="Button">
<Listeners>
<Click Fn="nm.Add">
</Click>
</Listeners>
</ext:Button>
<ext:Panel ID="Panel1" runat="server" Layout="FitLayout">
</ext:Panel>
</Items>
</ext:Viewport>
</body>
</html>
and Coba2.aspx is
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Coba2.aspx.cs" Inherits="Coba2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
<div>
This is Coba2
</div>
</form>
</body>
</html>
Anyone can help this problem?
Solution
Should be
renderer: 'frame'
instead of
mode: 'frame'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow