[CLOSED] Difference between DirectMethod , DirectEvent, Static DirectMethod

  1. #1

    [CLOSED] Difference between DirectMethod , DirectEvent, Static DirectMethod

    Hi,

    Could you explain us what is the difference between DirectMethod, DirectEvent and Static DirectMethod in very detail, what event's fires in the page life cycle each one, etc... it is important because I use StateServer session management and I found when I use DirectMethod the ReleaseRequestState event don't fire.

    Thanks for help.
    Last edited by Daniil; Mar 07, 2011 at 10:14 PM. Reason: [CLOSED]
  2. #2
    Hi

    - DirectEvent: server side handler for client side event of particular widget. Widget server side instance must be exist on server side (otherwise ResourceManager will not able to find handler)
    http://examples1.ext.net/#/Events/Di...ents/Overview/
    http://examples1.ext.net/#/Events/Di...ts/WebService/

    By default, DirectEvent submits whole form (including ViewState if presented) therefore all widgets get values from submit and page executes full life cycle (IsPostBack will be true). You can this behaviour by setting Type="Load" for DirectEvent. In this case, ExtraParams only will be submitted

    - DirectMethod (none static, must be public): server side handler is raised when you call special javascript method (basically, proxy method is generated by Ext.Net toolkit). None static direct method can be defined inside Page, User Control or any Custom Control. Please note, if direct method is defined inside user control (master page placeholders are user controls also) or custom control then ClientID of that control will be added to proxy method
    Ext.net.DirectMethods.ClientIDOfTheControl.DirectMethodName();
    You can use DirectMethodProxyID attribute for the class to define own alias or completely remove ClientID prefix
    Really, none static direct method is direct event. Single difference, that direct method has no relation with any widget (and its events) and can be raised by developer from javascript (as javascript method)

    - Static DirectMethod (must be public): similar ASP.NET PageMethods, can be defined inside Page class only. With static page method the Page life cyle is not execued therefore access to ASP.NET control is not possible but response time much better (depends from your method logic only)

    http://examples1.ext.net/#/Events/Di...hods/Overview/
    http://examples1.ext.net/#/Events/Di...thods/ID_Mode/
    http://examples1.ext.net/#/Events/Di.../UserControls/
    http://examples1.ext.net/#/Events/Di...ds/WebService/
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. [CLOSED] DirectEvent & DirectMethod
    By trieu.tran in forum 1.x Premium Help
    Replies: 2
    Last Post: May 31, 2012, 12:47 PM
  2. Replies: 1
    Last Post: Aug 05, 2011, 10:16 AM
  3. Replies: 13
    Last Post: May 16, 2011, 2:26 PM
  4. [CLOSED] DirectEvent or static DirectMethod?
    By macap in forum 1.x Premium Help
    Replies: 3
    Last Post: Nov 23, 2010, 1:31 PM
  5. [CLOSED] Static DirectMethod
    By amitpareek in forum 1.x Premium Help
    Replies: 21
    Last Post: Jun 03, 2010, 1:42 AM

Tags for this Thread

Posting Permissions