Nov 16, 2012, 11:05 AM
[CLOSED] Static DirectMethod and Dynamic Window (created from code behind)
Hi,
I am able to add an alert from code behind, but I am not able to create and show a dynamic window using a static directmethod.
Bellow is the code to reproduce.
Thanks
I am able to add an alert from code behind, but I am not able to create and show a dynamic window using a static directmethod.
Bellow is the code to reproduce.
Thanks
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
[DirectMethod]
public static void UserPoints()
{
X.Msg.Alert("1", "2").Show();
var window = new Window {ID = "window1"};
window.Show();
window.Render();
}
</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 id="Head1" runat="server">
<title>ComboBox with show/hide of custom FieldTrigger - Ext.NET Examples</title>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:DisplayField runat="server">
<Listeners>
<BeforeRender Handler="#{DirectMethods}.UserPoints({ eventMask : { showMask : false }, failure: function (errorMsg) {} });" />
</Listeners>
</ext:DisplayField>
</form>
</body>
</html>
Last edited by Daniil; Nov 16, 2012 at 2:11 PM.
Reason: [CLOSED]