POST Request with ComponentLoader not work

  1. #1

    POST Request with ComponentLoader not work

    Hello,
    I need to do a Component Loader request using the POST method.
    I'm in Desktop scenario and into the main ASPX (where there is a Desktop object)
    I have a DirectMethod that open dynamically window into the Desktop.

    var createWindow = function (pageName, params) {
        App.direct.createWindow(page, params);
    };
    [DirectMethod(ShowMask = true)]
            public void createWindow(string pageName, string info)
            {
                Info i = JsonConvert.DeserializeObject<Info>(info);
                
                Window wnd = new Window
                {
                    ID = pageName,
                    CloseAction = CloseAction.Destroy,
                    Layout = "FitLayout",
                    Title = "Title",
                    Loader = new ComponentLoader
                    {
                        Url = "/Pages/"+pageName+".aspx",
                        Mode = LoadMode.Frame,
                        LoadMask =
                        {
                            ShowMask = true,
                            Msg = "Loading..."
                        }
    
                        ,AjaxOptions = new AjaxOptions{ 
                            FormID = "ao_" + pageName,                        
                            Method = HttpMethod.POST,
                            
                        }
    
                    }
                };
                
                wnd.Loader.Params.Add(new Parameter("info", JsonConvert.SerializeObject(i)));
    
                Desktop1.CreateWindow(wnd);
            }
    The request work but the "info" parameter is always send in GET.
    What is the problem?

    Thanks in advance.
  2. #2
    Hello!

    Couldn't reproduce with the sample below that based on this example: https://examples2.ext.net/#/Panel/Basic/Loader/

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Panel 
            ID="Panel2"
            runat="server" 
            Height="150"
            Width="350"
            Title="Merge Mode"
            BodyPadding="5">
            <Loader runat="server" Url="Child.aspx" Mode="Html">
                <AjaxOptions Method="POST" />
                <LoadMask ShowMask="true" />
            </Loader>
        </ext:Panel>
    </body>
    </html>
  3. #3
    AjaxOptions has no sense for Frame mode because iframe objects is using to get content (no ajax request)
    IFrame html element always uses GET request

Similar Threads

  1. Replies: 0
    Last Post: Apr 18, 2013, 11:03 AM
  2. Replies: 0
    Last Post: Aug 14, 2012, 2:54 PM
  3. Replies: 0
    Last Post: Aug 14, 2012, 2:48 PM
  4. Replies: 4
    Last Post: Feb 16, 2012, 2:05 AM
  5. Replies: 3
    Last Post: Jan 13, 2010, 3:07 AM

Tags for this Thread

Posting Permissions