Oct 28, 2019, 11:12 AM
[CLOSED] Issue with Dialog
Hello,
I'm upgrading to Ext.Net 5.0 but I'm stuck on dialog. On previous version I called a javascript function to oepn a new dialog wich contains another ext.net page.
Unfortunatelly I cannot make it work with version 5.0 and I do not know why. This is an example code wich reproduces the issue.
When clicked the button should open a dialog wich contains the same page. The dialog is opened and the call to the page is done, but nothing is shown.
Any Clues?
This is the code for test.aspx
I'm upgrading to Ext.Net 5.0 but I'm stuck on dialog. On previous version I called a javascript function to oepn a new dialog wich contains another ext.net page.
Unfortunatelly I cannot make it work with version 5.0 and I do not know why. This is an example code wich reproduces the issue.
When clicked the button should open a dialog wich contains the same page. The dialog is opened and the call to the page is done, but nothing is shown.
Any Clues?
This is the code for test.aspx
<%@ Page Language="C#" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<script runat="server">
protected void Button1_Click(object sender, DirectEventArgs e)
{
string script="newWindow('test.aspx',{title: 'New title'})";
Button1.AddScript(script);
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Example</title>
<script type="text/javascript">
var newWindow = function (url, config) {
new Ext.Window(Ext.apply({
renderTo: Ext.getBody(),
resizable: false,
title: "Test",
height: 500,
width: 500,
frame: true,
autoLoad: {
showMask: true,
mode: "iframe",
url: url
}
}, config)).show();
}
</script>
</head>
<body>
<ext:ResourceManager runat="server" Theme="Triton" />
<form runat="server">
<ext:Panel
ID="Window1"
runat="server"
Title="Welcome to Ext.NET"
Height="215"
Width="350"
Frame="true"
Collapsible="true"
Cls="box"
BodyPadding="5"
DefaultButton="0"
Layout="AnchorLayout"
DefaultAnchor="100%">
<Items>
<ext:TextArea
ID="TextArea1"
runat="server"
EmptyText=">> Enter a Test Message Here <<"
FieldLabel="Message"
Height="85"
/>
</Items>
<Buttons>
<ext:Button
ID="Button1"
runat="server"
Text="Submit"
Icon="Accept"
OnDirectClick="Button1_Click"
/>
</Buttons>
</ext:Panel>
</form>
</body>
</html>
Last edited by fabricio.murta; Oct 31, 2019 at 5:13 PM.