Jul 31, 2012, 4:50 PM
[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
What am I missing or doing wrong that I can't find my Direct Methods on the client side?
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]