[CLOSED] Listeners, Validators, Renderers - Apply from code behind or markup?

  1. #1

    [CLOSED] Listeners, Validators, Renderers - Apply from code behind or markup?

    Hi,

    The examples below are based on Listeners, but my question is also about validators and renderers.

    Are there any differences (e.g. performance) between listener applied directly in Ext.Net mark-up and the one applied from code behind ?

    option 1:

    <ext:Container runat="server" ID="myContainer" >
        <Listeners>
            <AfterRender 
                Fn="MyCtrl.onAfterRender"
                Scope="MyCtrl" />
        </Listeners>
    </ext:Container>
    option 2:

    protected void Page_Load(object sender, EventArgs e)
    or
    protected override OnInit(...)
    
    {
        myContainer.Listeners.AfterRender.Fn = "MyCtrl.onAfterRender";
        myContainer.Listeners.AfterRender.Scope = "MyCtrl";
    }
    My brief understanding is

    The 1st option allows to put all in the mark-up and deal only with JavaScript and the Mark-up (no code behind). The issue I see is repeating scopes for more than one listener and more mark-up.

    The 2nd option is more manageable in terms of repeating scopes but require executing code behind.

    Please let me know if there is anything important regarding these implementations.

    Thank you
    Last edited by Daniil; Dec 11, 2014 at 7:41 AM. Reason: [CLOSED]
  2. #2
    Hi @matt,

    I would say there is absolutely no difference in performance.

    I like this answer on your question.
    http://forums.ext.net/showthread.php...ll=1#post37887

Similar Threads

  1. [CLOSED] Chart: Creating in behind code and listeners
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 26, 2013, 12:06 PM
  2. [CLOSED] Listeners added for button at code behind is not working
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 31, 2012, 3:32 PM
  3. Replies: 4
    Last Post: Sep 30, 2011, 9:36 AM
  4. Replies: 2
    Last Post: Nov 16, 2010, 1:02 PM
  5. [CLOSED] [1.0] INVOKE LISTENERS FROM VB CODE
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 22, 2010, 8:30 AM

Tags for this Thread

Posting Permissions