I have this element <select>
:
<select id="status" class="form-control form-control-sm" name="arquivo" >
@{ foreach (string valor in ViewBag.ListaArquivos)
{
<option value="@valor">@valor</option>
}
}
</select>
The Controller expects a parameter of type string
.
I would like to know how to pass the selected value to this Html.Beginforms
:
@using (Html.BeginForm("MostrarDocumentos", "Usuario", new { arquivo = } ,FormMethod.Post, new { target = "_blank" }))
{
<a href="javascript:;" target="_blank" onclick="document.forms[0].submit(); ">Visualizar</a>
<hr />
}
I want to get value
of <select>
and send Html.BeginForms
, how can I do this?