0
I have that 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>
Controller expects a parameter of type string
.
I would like to know how I can 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 the value
of <select>
and send by Html.BeginForms
, how can I do this?
Can you post the controller code? Or at least the header?
– George Wurthmann