call .ascx

  1. #1

    call .ascx

    Hi,
    I have the problem with call file .ascx with visibiliti not work
    how can I do ? Thanks

    File Index.aspx
    <body>
     <form id="Form1" runat="server">
            <ext:ResourceManager runat="server" />
       <ext:Panel 
                ID="DashBoardPanel" 
                runat="server" 
                Cls="items-view" 
                Layout="fit"
                AutoHeight="true"
                Width="800" 
                Border="false">
       <Items>
                    <ext:DataView 
                        ID="Dashboard"
                        runat="server" 
                        StoreID="Store1" 
                        SingleSelect="true"
                        OverClass="x-view-over" 
                        ItemSelector="div.item-wrap" 
                        AutoHeight="true" 
                        EmptyText="No items to display">
                      <DirectEvents>
                           <SelectionChange OnEvent="buttonOpenWind">
                           </SelectionChange>
                        </DirectEvents>
            </ext:DataView>
                </Items>
            </ext:Panel>
            <uc4:WindowEditor ID="Customers" runat="server" Visible ="false"/>
    
        </form>
    </body>
    File Index.cs
    [DirectMethod]
        protected void buttonOpenWind(object sender, DirectEventArgs e)
        {
            Customers.Visible = true;
           
        }
    Last edited by Daniil; Mar 19, 2012 at 7:17 AM. Reason: Please use [CODE] tags
  2. #2
  3. #3

    .ascx

    sorry but I did not understand the explanation

    Control headerControl = (Control)LoadControl("Customers.ascx");
            PlaceHolder1.Controls.Add(headerControl);
    I tried to load the control but does not work so someone can give me a solution please?
    Last edited by geoffrey.mcgill; Mar 19, 2012 at 7:21 PM. Reason: please use [CODE] tags
  4. #4
    Forget my post, I didn't notice that you use the Visible property of a user control.

    Anyways, changing Visible during DirectEvent doesn't make sense.

    Please see the example how to load user controls dynamically.
    https://examples1.ext.net/#/XRender/...UpdateContent/
  5. #5
    I've just noticed the thread is on the Help 2.x forum. Could you confirm you use Ext.NET v2?

Similar Threads

  1. Adding ascx controls
    By WesterCape2010 in forum 1.x Help
    Replies: 0
    Last Post: Apr 08, 2010, 12:44 PM
  2. ascx control
    By maxdiable in forum 1.x Help
    Replies: 0
    Last Post: Jul 07, 2009, 5:42 AM
  3. ASCX and AjaxMethod
    By Maia in forum 1.x Help
    Replies: 2
    Last Post: Mar 11, 2009, 10:06 AM
  4. Question ascx
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Feb 26, 2009, 3:48 PM
  5. Get id of elements into page.ascx
    By flaviodamaia in forum 1.x Help
    Replies: 3
    Last Post: Jan 23, 2009, 7:26 AM

Tags for this Thread

Posting Permissions