Dec 03, 2014, 1:52 PM
[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:
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
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)
orprotected 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]