Jul 04, 2012, 7:20 AM
[CLOSED] How should I nested ext.net.controls with user controls?
Hi,
I got this problem since I got my user control which have
Any ideas how to fix it?
Structure of my program is like this
Page.Master got:
is only connected to Page.Master and got :
master.page:
ViDom
I got this problem since I got my user control which have
<ext:BorderLayout ID="BorderLayout1" runat="server"/>
When I try to put this user control to another user control and then make MyUserControl myctrl = this.LoadControl("~/controls/MyUserControl.ascx");
My page start to be empty is this normal behaviour? Is there any solution to make it start to work. I already lost 2 days of trying things with (add. ext.net.panel to my new control MyUserControl
and adding to it my old control with borderlayout) And It's seems to work when I get clear page without masterpage on it. but I can't resignate from masterpage. Any ideas how to fix it?
Structure of my program is like this
Page.Master got:
<Viewport runat="server">
<Items>.....</Items>
<Content> here are simple <asp:ContentPlaceHolder ID="siteContent" runat="server" /> </Content>
</Viewport>
my page:is only connected to Page.Master and got :
<asp:Content ID="contentContainer" ContentPlaceHolderID="siteContent" runat="server">
<asp:Panel runat="server" ID="pnDetails"></asp:Panel><%here i try to put MyUserControl%>
</asp:Content>
all code for test:master.page:
<ext:Viewport ID="ViewportMainExt" runat="server" Layout="border" MinWidth="980">
<Items>
<ext:Panel ID="PanelMenu" runat="server" Title="Menu" Region="North" Height="70"
Split="false" Collapsible="false" Header="false" AutoDoLayout="true" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
<Items>
<ext:Panel ID="PanelNorth" runat="server" Title="Menu" Height="40" Visible="true"
Border="false" Split="false" Collapsible="false" Header="false">
<Items>
<ext:Toolbar ID="toolbarLogo" runat="server" Height="40" Cls="mme_title_toolbar">
<Content>
<iframe id="Iframe1" width="1" height="1" scrolling="no" style="display: none;" runat="server"
src="TaskManager.aspx" />
<ext:Label ID="labelLogo" runat="server" Text="Title" Cls="mme_title_label" />
</Content>
</ext:Toolbar>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
<ext:Panel ID="PanelMain" runat="server" Region="Center" Split="false" AutoScroll="true"
Collapsible="false" AutoDoLayout="true" Shadow="Frame">
<Content>
<asp:ContentPlaceHolder ID="siteContent" runat="server" />
</Content>
<LoadMask ShowMask="true" Msg="Please wait ..." />
</ext:Panel>
</Items>
</ext:Viewport>
details.aspx:<%@ Page Title="" Language="C#" MasterPageFile="~/Page.Master" AutoEventWireup="true" CodeBehind="Details.aspx.cs" Inherits="MMEwidencja.MMEWebsite.Details1" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<asp:Content ID="contentContainer" ContentPlaceHolderID="siteContent" runat="server">
<ext:Panel runat="server" ID="pnDetail"></ext:Panel>
</asp:Content>
details.aspx.cs
protected void Page_Init(object sender,EventArgs e)
{
controls.ServiceOrderRepair ser =
(controls.ServiceOrderRepair)LoadControl("~/controls/ServiceOrderRepair.ascx");
ser.ID="serOrdRep";
pnDetail.Controls.Add(ser);
}
ThanksViDom
Last edited by Daniil; Jul 06, 2012 at 3:37 PM.
Reason: [CLOSED]