[CLOSED] Get value RadioGroup Request Form

  1. #1

    [CLOSED] Get value RadioGroup Request Form

    I need use RadioGroup, but i dont know when pegar o valor no request form.

    my apllication is mvc

    my method save, received o radiogroup with object and i dont get value selected.


    how make to resolve this problem?
    Last edited by Daniil; Feb 27, 2012 at 7:41 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please look at the example.

    Example View
    <%@ 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.MVC Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:FormPanel ID="FormPanel1" runat="server" Url="/Test/Submit">
            <Items>
                <ext:TextField ID="TextField1" runat="server" Text="I am the TextField" />
                <ext:RadioGroup runat="server" GroupName="Group1" ColumnsNumber="1" >
                    <Items>
                        <ext:Radio runat="server" InputValue="0" Checked="true" />
                        <ext:Radio runat="server" InputValue="1" />
                    </Items>
                </ext:RadioGroup>
            </Items>
        </ext:FormPanel>
        <ext:Button runat="server" Text="Submit">
            <Listeners>
                <Click Handler="#{FormPanel1}.submit();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
    Example Controller Action
    public ActionResult Submit(FormCollection values)
    {            
        string textField = values["TextField1"];
        string radioGroup = values["Group1"];
    
        FormPanelResult r = new FormPanelResult();
        r.Success = true;
    
        return r;
    }
  3. #3
    This is great!!!!!

    thanks!

Similar Threads

  1. Replies: 5
    Last Post: Nov 02, 2011, 6:20 AM
  2. Replies: 8
    Last Post: Oct 21, 2011, 6:03 PM
  3. Replies: 2
    Last Post: Aug 29, 2011, 3:53 PM
  4. Replies: 4
    Last Post: Jun 09, 2010, 8:33 PM
  5. Replies: 0
    Last Post: Jun 08, 2009, 12:04 PM

Posting Permissions