[CLOSED] pass params on form post in custom config

  1. #1

    [CLOSED] pass params on form post in custom config

    Hello,

    I need to pass the "redirect" as a parameter of the form so on the MVC side, i can declare the method Blah to receive it. How can i do this? Is it easier to add an element to the Items?

    Thanks,
    /Z

            public ActionResult Blah(bool? redirect)
    
    
    
                        <ext:FormPanel 
                            ID="Form1"
                            runat="server" 
                            Border="false"
                            Height="500"
                            Padding="30"
                            BodyStyle="background:transparent;" >
                            <AutoEl Tag="Form">
                                <CustomConfig>
                                    <ext:ConfigItem Name="method" Value="POST" Mode="Value" />
                                    <ext:ConfigItem Name="redirect" Value="Ext.get('_redirect').getValue()" Mode="Raw" />
                                    <ext:ConfigItem Name="action" Value="/Test/Blah" Mode="Value" />
                                </CustomConfig>
                            </AutoEl>
                            <Items>
    Last edited by fabricio.murta; Jan 09, 2018 at 6:06 PM.
  2. #2
    Hello @Z!

    I believe you have to just add "?redirect=true" to the URL (or the calling form's POST parameters).

    Reference: Controllers and Action Methods in ASP.NET: Automatically Mapping Action-Method Parameters

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    thanks!
    i passed it in the form and it worked better that way.
    /Z
  4. #4
    Hello @Z!

    Thanks for the feedback, and glad it helped!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. checkbox value on form post
    By kutlu in forum 2.x Help
    Replies: 1
    Last Post: Apr 21, 2015, 9:21 AM
  2. [CLOSED] Form post issue for gridpanel inside form panel
    By alscg in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 19, 2013, 1:16 PM
  3. [CLOSED] How to pass a value from js script to autoload params?
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 09, 2012, 8:25 PM
  4. [CLOSED] [1.0]Add store custom params at runtime
    By edigital in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 28, 2010, 2:41 PM
  5. [CLOSED] Pass params to Ext.net.DirectMethods
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 27, 2010, 1:50 PM

Posting Permissions