[CLOSED] [1.0] Problem with very large param

  1. #1

    [CLOSED] [1.0] Problem with very large param

    I have a panel that loads an external page, and i need to post very large data, i was passing the params like this, it works for small text but with very large data i get the following error in the external page:
    Bad Request - Invalid Verb

    HTTP Error 400. The request verb is invalid.

            <ext:Panel runat="server" ID="pnlBody">
                <AutoLoad Mode="IFrame" NoCache="true" Scripts="true" Method="POST">
                    <Params>
                      <ext:Parameter Name="valor" Mode="Value" />
                    </Params>
                </AutoLoad>
             </ext:Panel>
    
    
            pPanel.AutoLoad.Url = Page.ResolveUrl("~/page.aspx")
            pPanel.AutoLoad.Params(0).Value = Page.Server.HtmlEncode(REALLY LONG TEXT)
            pPanel.LoadContent()
    how could i accomplish this?
    thanks a lot
    Last edited by geoffrey.mcgill; Sep 24, 2010 at 4:19 AM. Reason: [CLOSED]
  2. #2
    Hi,

    By default a browser uses GET method for loading iframe pages. Setting method as POST doesn't make sense in this case.
    Respectively parameters are passed through a query string. As you know there is rather small limit on its size.

    With Merge mode setting method as POST makes sense. And parameters will be passed through a post collection.
    As I know there is no limit on its size.
  3. #3
    the problem is that i can't use merge, because that page is using a texteditor component, that needs to run in iframe mode, because with merge doesn't work, how could accomplish that?
    because the parameter is the text for that texteditor.
    Thanks
  4. #4
    Hi,

    Please look at the technique how it's possible to set an iframe's component initial value from a main page.
    In this case you can avoid passing a large parameter.

    Example of Main Page
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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 runat="server">
        <title>Ext.Net Example</title>
    
        <script type="text/javascript">
            var myFunction = function() {
                Panel1.getBody().TextArea1.setValue("Your too long text");
            }
        </script>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Panel ID="Panel1" runat="server">
            <AutoLoad Mode="IFrame" Url="TestPage.aspx">
                <Params>
                    <ext:Parameter Name="callback" Value="myFunction" />
                </Params>
            </AutoLoad>
        </ext:Panel>
        </form>
    </body>
    </html>
    Example of Child Page
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Request["callback"] != null)
            {
                ResourceManager1.Listeners.DocumentReady.Handler = "parent['" + Request["callback"] + "']()";
            }
        }
    </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 runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:TextArea ID="TextArea1" runat="server" />
        </form>
    </body>
    </html>
  5. #5
    that worked!!! thanks a lot, mark it as solved

Similar Threads

  1. [CLOSED] Mapping RecordField to a property with param
    By cmack in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 26, 2011, 4:38 PM
  2. tab.reload() not passing in updated param value!
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Jul 26, 2011, 10:10 AM
  3. Replies: 2
    Last Post: Jun 27, 2011, 10:37 AM
  4. Replies: 1
    Last Post: May 21, 2011, 1:20 PM
  5. Tab - Autoload Param value?
    By Tbaseflug in forum 1.x Help
    Replies: 3
    Last Post: Jun 17, 2009, 4:02 PM

Tags for this Thread

Posting Permissions