@ Html.ActionLink submitting form Post MVC

2
@using (Html.BeginForm("MinhaAction", "MeuController", FormMethod.Post ))
{
    <div>
        <table>
            <thead>
                <tr>
                    <th>Empresa</th>
                    <th>Cliente</th>
                    <th>Situação</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td><a href="@Url.Action("MinhaAction", "MeuController", item)">@item.Empresa</a></td>
                        <td><a href="@Url.Action("MinhaAction", "MeuController", item)">@item.Cliente</a></td>
                        <td><a href="@Url.Action("MinhaAction", "MeuController", item)">@item.Situacao</a></td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
}

Is it possible to submit a form in this way? What is the solution to this question?

    
asked by anonymous 12.05.2015 / 19:02

1 answer

1

No. There is a fierce confusion of concepts there.

A POST form sends information from a form using the data submission protocol. Clicking a link is a GET request that sends information through the requested HTTP address.

What you want to do, probably, is to typify some information to be sent. This can be done by using some information component, such as a% w / = vs.118% 29.aspx "> radiogroup " or else @Html.RadioButton() ) and treating the field in Action .

Do not forget to put the @Html.RadioButtonFor() button:

<button type="submit">Enviar</button>
    
12.05.2015 / 19:18