[CLOSED] Issue with Dialog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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

    <%@ 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.

Similar Threads

  1. [CLOSED] FileUploadField as File Dialog
    By Argenta in forum 3.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 23, 2015, 6:42 AM
  2. Fileupload after Save Dialog issue
    By reyonlines in forum 1.x Help
    Replies: 5
    Last Post: Jan 03, 2011, 5:27 PM
  3. Get the value from prompt dialog and save
    By CoolNoob in forum 1.x Help
    Replies: 5
    Last Post: Oct 23, 2009, 2:13 PM
  4. [CLOSED] Save as dialog?
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 01, 2009, 12:53 PM

Posting Permissions