I'm trying to pass 2 parameters to the method that is in the controller from the view, but only recognizes the value of the first parameter, the other comes as null, which I'm doing wrong, this is the code.
View
table>
<tr>
<% foreach (var item2 in Model)
{ %>
<input type="hidden" id="idColegio" value="<%: item2.idColegio %>" />
<td><p style="color:black;font-size:medium">Gestiones:</p></td>
<td><%: Html.DropDownList("gest", new SelectList(ViewBag.gestiones, "Value", "Text"), htmlAttributes: new { @class = "form-control", onchange = "document.location.href = '/CursosOfrecidos/Index?id='+ this.options[this.selectedIndex].value , 'idColegio='+item2.idColegio", style = "width:150px;", @id = "ges", @name = "gestion" }) %></td>
</tr>
</table>
Controller
public ActionResult Index(int id, int? idColegio )
{
return View(cursoso);
}
Help for fa ...