[CLOSED] DirectMethod with UserControl Problem

  1. #1

    [CLOSED] DirectMethod with UserControl Problem

    Here is the sample of the code (where the function "directmethodFunction" is being called from a Listener).
    I tried to check the example as well as some existing issues related to DirectMethod but so far I get
    "object doesn't support this property or method" error.


    Parent.aspx
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
                ucUserControl= (UserControl)this.LoadControl("UserControl.ascx");
                ucUserControl.ID = "UserControlID";
                this.panel1.ContentControls.Add(ucUserControl);
    </script>
    UserControl.ascx
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
            [DirectMethod]
            public static void LogException(string e)
            {
                X.Msg.Alert("LogException", e).Show();
            }
    </script>
    <script type="text/javascript">
    var directmethodFunction = function(){
          Ext.net.DirectMethods.LogException('testing');
    }
    </script>
    Last edited by Daniil; Sep 21, 2011 at 8:41 AM. Reason: [CLOSED]
  2. #2
    I found the solution by adding the alias.

    [DirectMethodProxyID(IDMode = DirectMethodProxyIDMode.Alias, Alias = "UC")]
    Please close this ticket.

Similar Threads

  1. Help me dont work UserControl directmethod. plz
    By SeoNamseok in forum 2.x Help
    Replies: 0
    Last Post: Jul 09, 2012, 8:19 AM
  2. [CLOSED] DirectMethod: UserControl in a Layer not working
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 20, 2012, 2:12 AM
  3. [CLOSED] DirectMethod and UserControl
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 21, 2010, 7:15 PM
  4. [CLOSED] [1.0] DirectMethod - Page . UserControl . UserControl
    By Patrick in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 25, 2010, 9:33 AM
  5. [CLOSED] XRender UserControl DirectMethod
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jan 22, 2010, 1:03 PM

Posting Permissions