[CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

  1. #1

    [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Hello,

    Is it possible to pass through ExtraParams when carrying out a DirectEvent with IsUpload set to true?


    The code I am trying to use is:


    
    
    	<ext:Button ID="btnDoExport" runat="server" Text="Export">
                <DirectEvents>
                    <Click ViewStateMode="Enabled" OnEvent="btnDoExport_Click" IsUpload="true">
                        <ExtraParams>
                            <ext:Parameter Mode="Raw" Name="ExportType" Value="#{ExportType}.getValue()" />
                            <ext:Parameter Mode="Raw" Name="ExportFormat" Value="#{ExportFormat}.getValue()" />
                        </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:Button>

    Thanks,
  2. #2

    RE: [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Hi,

    Yes, it is possible. Do you have any problems?

    Here is my test case
    <%@ 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></title>
        
        <script runat="server">
            protected void btnDoExport_Click(object sender, DirectEventArgs e)
            {
                var s1 = e.ExtraParams["ExportType"];
                var s2 = e.ExtraParams["ExportFormat"];
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server"></ext:ResourceManager>
            
            <ext:FileUploadField runat="server" Width="200" />
            
            <ext:Hidden ID="ExportType" runat="server" Text="ExportType" />
            <ext:Hidden ID="ExportFormat" runat="server" Text="ExportFormat" />
            
            <ext:Button ID="btnDoExport" runat="server" Text="Export">
                <DirectEvents>
                    <Click ViewStateMode="Enabled" OnEvent="btnDoExport_Click" IsUpload="true">
                        <ExtraParams>
                            <ext:Parameter Mode="Raw" Name="ExportType" Value="#{ExportType}.getValue()" />
                            <ext:Parameter Mode="Raw" Name="ExportFormat" Value="#{ExportFormat}.getValue()" />
                        </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:Button>
        </form>
    </body>
    </html>
  3. #3

    RE: [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Yes for some reason the values are not passing through unless I remove the IsUpload="true" attribute, however, removing this means that my file download doesn't work.

    I have tried examining the request data using Fiddler and I can't see the Ext parameters being passed through to the server in any way.


    I will give your test page a go with my build of Ext DLLs and see if it works (or not).
  4. #4

    RE: [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Okay I tried your sample and it worked fine.

    I then copied in some of my code form my own project and it still worked fine. I was running Fiddler as a proxy capturing web traffic, I didn't know if that might cause some problems so I have turned that off and now the ExtraParams seem to pass through intermittently. For example, I have IE open on the page and it submitted fine, I then submitted again and the params didn't pass through. I also have firefox on the same page and it won't work (params are null).


    Looking in FireBug I can see the params being passed:


    
    
    <td role="presentation" class="netInfoParamName ">{</td><td role="list" aria-label="submitDirectEventConfig" class="netInfoParamValue "><code role="listitem" class="focusRow 
    subFocusRow ">"config":{"viewStateMode":"enabled","extraParams":{"ExportType":"Full","ExportFormat":"PDF"}}}
    
    </code></td>
    <td role="presentation" class="netInfoParamName ">
    But they are null on the server. This page has an ASP script manager and also has some processing in Page_Init to parse and use the view state but I can't see that this should interfere with anything?</td><td role="list" aria-label="submitDirectEventConfig" class="netInfoParamValue ">
    </td>
  5. #5

    RE: [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Ooops, looks like the formatting broke my last post otherwise I would put this as an edit.

    Checking Request["textBoxContactName"] returns the value of the textbox on the form (ASP) control. Checking the value of Request["ExportFormat_Value"] and Request["submitDirectEventConfig"] returns null even though according to FireBug these should have values.
  6. #6

    RE: [CLOSED] [1.0] ExtraParams with DirectEvent when IsUpload="true"

    Hi,

    Do you able to create test project which reproduces such behaviour?


    EDIT: Marking as [CLOSED] as no further information was provided.

Similar Threads

  1. Replies: 16
    Last Post: May 18, 2012, 7:29 AM
  2. [CLOSED] Save File dialogbox coming when IsUPload="true"
    By webppl in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: May 17, 2011, 10:35 AM
  3. Finish AjaxEvent with isUpload=true
    By Kaido in forum 1.x Help
    Replies: 0
    Last Post: Nov 09, 2010, 3:25 PM
  4. [CLOSED] [1.0] NORESPONSE in Button with IsUpload=true
    By macap in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 22, 2010, 1:33 PM
  5. Replies: 0
    Last Post: Apr 24, 2009, 11:02 AM

Posting Permissions