[CLOSED] Need Help with DirectMethod and UserControls

  1. #1

    [CLOSED] Need Help with DirectMethod and UserControls

    Hello,
    I've been working on a project that uses custom controls that inherit some of the Ext.Net base classes. I'm trying to add DirectMethods to them as well but they are not rendering to the client page.

    Here is a short snippet example of my custom control
    [Meta]
        public partial class TestControl: Ext.Net.GridPanel
        {
            [DirectMethod()]
            public int FilterByName(string name)
            {
                var count = 0;
                return count;
            }
        }
    Here is my ASPX page snippet
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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>TESTER</title>
     <ext:ResourcePlaceHolder runat="server" />
    </head>
    <body>
     <form id="form1" runat="server">
            
            <ext:ResourceManager DirectMethodProxy="Include" runat="server" />
           <ext:App ID="Sales" runat="server">
                <Launch>
                    <panels:TestControl ID="panelTestControl1" runat="server"></panels:TestControl>
                </Launch>
            </ext:App>
        </form>
    </body>
    </html>
    My problem is that I can see my control, its properties, but none of the direct methods are there. Ultimately what I want is the direct methods available in the same namespaces as the controls properties. For example, if my control is accessible in javascript as App.panelTestControl1, then the direct method should be visible as App.panelTestControl1.FilterByName.

    What am I missing or doing wrong that I can't find my Direct Methods on the client side?
    Last edited by Daniil; Aug 03, 2012 at 5:45 PM. Reason: [CLOSED]
  2. #2

Similar Threads

  1. [CLOSED] Window w/ UserControls
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 10, 2012, 4:45 PM
  2. [CLOSED] Difference between DirectMethod , DirectEvent, Static DirectMethod
    By syllabusarq in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2011, 11:37 AM
  3. [CLOSED] [1.0] DirectEvents in Usercontrols
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 12, 2010, 9:39 AM
  4. [CLOSED] UserControls and Events
    By drgw74 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 05, 2010, 5:07 PM
  5. [CLOSED] AjaxMethods in UserControls
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Nov 19, 2009, 8:39 AM

Posting Permissions