May 29, 2013, 8:40 PM
[CLOSED] You have to set widget's ID to call its methods
I build a control from the codebehind and then used a DirectMethod to close and it gives me the next error : You have to set widget's ID to call its methods.
Can Anybody help me?
Can Anybody help me?
<%@ Page Language="C#" %>
<%@ Import Namespace="Panel=Ext.Net.Panel" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html />
<script runat="server">
Ext.Net.Window window1 = new Ext.Net.Window();
/*---------------------------------------------------------------------------------------------------------*/
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
window1.Border = true;
window1.Width = 572;
window1.Height = 430;
window1.Add(new Ext.Net.Button() { ID = "btnprueba", Text = "Test", OnClientClick = "App.direct.dmtest()" });
this.Page.Controls.Add(window1);
}
}
/*---------------------------------------------------------------------------------------------------------*/
[DirectMethod]
public void dmtest()
{
this.window1.Close();
}
/*---------------------------------------------------------------------------------------------------------*/
</script>
<script type="text/javascript" language="javascript">
</script>
<html>
<head id="head" runat="server">
<title>The CRUD Example</title>
<link href="/resources/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
</body>
</html>
Last edited by Baidaly; Jun 04, 2013 at 2:43 AM.
Reason: [CLOSED]