I have html dropdown
@using (Html.BeginForm("SetCulture", "Home"))
{
<fieldset>
<select id="lngSelect" class="form-control">
<option name="culture" id="en-us" value="en-us">Eng</option>
<option name="culture" id="es" value="es">Es</option>
<option name="culture" id="ar" value="ar">Ar</option>
</select>
</fieldset>
}
jquery script
<script type="text/javascript">
(function ($) {
$("#lngSelect").change(function () {
$(this).parents("form").submit(); // post form
});
})(jQuery);
and controller action
public ActionResult SetCulture(string culture)
{
...
}
I need to pass value selected option to controller, but value passed is null instead of en-us, es, ar... I have tried to change name of controller parameter to "id" and "value", but still it's null in controller..
Can someone help me solve this?