Direct Event and ResourceManagement

  1. #1

    Direct Event and ResourceManagement

    hi,

    Who can help me a little about the details of Ext.Net direct event management and ResourceManager component.

    I use Ext.net for a framework that load module dynamically but i have problem with module direct event.

    tank you.
    Last edited by geoffrey.mcgill; Jul 05, 2011 at 7:40 AM.
  2. #2
    Hi,

    Please provide more details. You initial post is not informative at all
  3. #3

    Reply

    hi,
    Tanks
    I have problem with Direct Methods, when i create user controls that have direct method and load dynamically to parent page, the user control direct method not run or throw exception

    for example when change this sample of Ext.Net demo

    https://examples1.ext.net/#/XRender/...UpdateContent/

    System throw this exception "The control with ID 'UC1' not found"

    My change(Line 30-32)

    <%@ Control Language="C#" Inherits="Ext.Net.Examples.BaseUserControl" %>
    <%@ Import Namespace="System.Collections.Generic"%>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        public override List<string> ControlsToDestroy
        {
            get
            {
                // we should return none lazy controls only because lazy controls will be autodestroyed by parent container
                return new List<string>
                           {
                                Label1.ClientID,
                                Button1.ClientID
                           };
            }
        }
        
        [DirectMethod]
        public void DirectMethod()
        {
            
        }
    </script>
    
    <h1>№1</h1>
    <ext:Label ID="Label1" runat="server" Text="I am User control №1" />
    <br />
    <ext:Button ID="Button1" runat="server" Text="User control №1: Ext.Net button" >
        <Listeners>
            <Click Handler="#{DirectMethods}.DirectMethod()" />
        </Listeners>
    </ext:Button>
    <br />
    <asp:Button runat="server" Text="User control №1: ASP.NET button" OnClientClick="return false;" />
    Last edited by HosseinHelali; Jul 06, 2011 at 9:29 AM.
  4. #4
    Hi,

    User control which contains direct method must be recreated for each request otherwise resource manager will not able to find it
  5. #5

    Reply

    Thanks Vladimir for your answer
    Is it resource manager a method for update direct event without recreate all user control?
    If resource manager not have this method it is a good feature for EX.Net resource manager because this feature help for use Ext.Net for dynamic application (Portal, CMS, ...)
  6. #6
    Hi,

    It is ASP.NET limitation (not Ext.Net), any dynamic control must be recreated for correct event handling
    I recommend to read articles about dynamic controls to understand its behaviour

Similar Threads

  1. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  2. Direct Event Error
    By hamza_Dwe in forum 2.x Help
    Replies: 6
    Last Post: Nov 07, 2012, 8:22 AM
  3. [CLOSED] Event handler before direct event handlers
    By matejgolob in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 08, 2012, 2:31 PM
  4. Direct method and direct event over SSL?
    By dimitar in forum 1.x Help
    Replies: 0
    Last Post: Oct 08, 2011, 8:09 PM
  5. Replies: 3
    Last Post: Apr 20, 2010, 12:21 PM

Tags for this Thread

Posting Permissions