0
In the code below I am trying to pass a parameter to an Action. The action is being called and the value of the parameter is also being assigned to Url. But Action takes Null, not the value of the parameter.
@using (Html.BeginForm("Buscar", "Terapeutas", FormMethod.Post, htmlAttributes: new { @id = "form1", @name = "form1" }))
{
@Html.ValidationSummary(true)
foreach (var item in Model.Terapeutas)
{
<img src="/Terapeutas/ShowFoto/@item.ID_TERAPEUTA" class="img-circle" alt="Foto Terapeuta" width="120" height="120" />
}
}
How are you calling the
Action
, could add code?– Randrade
<img src="/Therapists/Showfoto/@item.ID_TERAPEUTA" class="img-Circle" alt="Photo Therapist" width="120" height="120" />
– Gleison França
Through the @Randrade URL
– Gleison França
Have you changed your routeConfig? If not, try this route here:
/Terapeutas/[email protected]_TERAPEUTA
– Randrade
You are the guy @Randrade .. It worked blz.. Valew
– Gleison França
I added an answer explaining better how it works.
– Randrade