[CLOSED] How to determine which Ext.Net control raised the current server call

  1. #1

    [CLOSED] How to determine which Ext.Net control raised the current server call

    Hi folks,

    I have some ext.buttons (and other controls) in a page all with DirectEvents (every every one has its own DirectEvent).

    I need to know how can I determine button ID was pressed at page_load, just before ejecute its OnEvent.

    Cheers
    Last edited by Daniil; Sep 03, 2012 at 5:02 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please take it directly from Request, the "__EVENTARGUMENT" key.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            X.Msg.Alert("Page_Load", this.Request["__EVENTTARGET"] + "<br/>" + this.Request["__EVENTARGUMENT"]).Show();
        }
    
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Button 
                ID="Button1" 
                runat="server" 
                Text="Fire DirectEvent" 
                OnDirectClick="TestDirectEventHandler" />
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] [#59] BeforeItemExpand is being raised just once
    By RCN in forum 2.x Legacy Premium Help
    Replies: 33
    Last Post: Jan 29, 2015, 2:59 PM
  2. Replies: 11
    Last Post: Feb 29, 2012, 3:57 PM
  3. [CLOSED] DirectMethods - call ajax - server side
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 13, 2011, 3:27 PM
  4. Call C# server method by javascript
    By joao.msdn in forum 1.x Help
    Replies: 1
    Last Post: May 25, 2010, 2:20 AM
  5. [CLOSED] Server side call inside of tag
    By Yevgeniy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 29, 2010, 3:58 PM

Posting Permissions