Query with parameter passing in a Url.Action

Asked

Viewed 1,204 times

2

I have a controller that gets an ID and makes a listing, plus on this page I have a button to return to the previous page, so as it also gets an id, so how could I pass this id dynamically?

Here I am returning passing ID 1 : Selectodality/1

<div class="span6">
    <a href="@Url.Action("SelecionarModalidade/1", "Modalidade" )" class="btn btn-lg btn-block btn-warning glyphicon glyphicon-hand-left">
    Retorno
    </a>
</div>

1 answer

2

Thus:

<a href="@Url.Action("SelecionarModalidade", "Modalidade", new { id = 1 })" class="btn btn-lg btn-block btn-warning glyphicon glyphicon-hand-left">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.