Apr 20, 2013, 11:48 AM
[CLOSED] Loading a UserControl into a Windows (Client Side)
Good Morning all
I need to load a UserControl (ascx) into a Window.
I tried to use the Example on your Page - but I had no success :-)
Here's what I did
The Client Side call
JavaScript runtime error: Unable to get property 'ShowTemplateNamingWindow' of undefined or null reference
I need to load a UserControl (ascx) into a Window.
I tried to use the Example on your Page - but I had no success :-)
Here's what I did
The Client Side call
function saveTemplate() {
Ext.create('Ext.window.Window', {
id: 'WinControlNaming',
title: 'Template Name',
height: 200,
width: 350,
layout: 'fit',
setLoading: true,
loader: {
loadMask: true,
autoload: false,
//directmethod: App.direct.ContentMaster_ucDetail.ShowTemplateNamingWindow,
mode: 'component',
on: ({
load: 'loadMask=false'
})
}
}).show();
}
My Direct Method <DirectMethod()>
Public Shared Function ShowTemplateNamingWindow() As String
Return ComponentLoader.ToConfig("~/View/Import/userControls/Declaration/TemplateNaming.ascx")
End Function
The Control<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="TemplateNaming.ascx.vb" Inherits="CUST.Import.View.TemplateNaming" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Container ID="ContainerTemplateNaming" runat="server" Layout="BorderLayout" Border="false" Padding="4">
<Items>
<ext:TextField runat="server" ID="txtTemplateName" FieldLabel="Name" AnchorHorizontal="80%" />
<ext:TextArea runat="server" ID="txtTemplateDescription" FieldLabel="Description" AnchorHorizontal="80%" />
<ext:FieldSet runat="server">
<Items>
<ext:Button runat="server" ID="cmdCancel" Text="cancel">
<Listeners>
<Click Fn="#{WinControlNaming}.close();" />
</Listeners>
</ext:Button>
<ext:Button runat="server" ID="cmdSave" Text="save">
<Listeners>
<Click Fn="" Single="true" />
</Listeners>
</ext:Button>
</Items>
</ext:FieldSet>
</Items>
</ext:Container>
And thats the Result :JavaScript runtime error: Unable to get property 'ShowTemplateNamingWindow' of undefined or null reference
Last edited by Daniil; Apr 30, 2013 at 4:14 AM.
Reason: [CLOSED]