i want to set dropdown value bt its not working.i am getting month from db and want to get selected that month which is coming from database.
$("input[name='lstwithdrwal[" + i + "].lstwithdrawlMonth']").val(json[i].lstwithdrawlMonth);
@Html.DropDownListFor(m => m.lstwithdrwal[ii].lstwithdrawlMonth, new SelectList(new[]
{
new { Value = "1", Text = "January" },
new { Value = "2", Text = "February" },
new { Value = "3", Text = "March" },
new { Value = "4", Text = "April" },
new { Value = "5", Text = "May" },
new { Value = "6", Text = "June" },
new { Value = "7", Text = "July" },
new { Value = "8", Text = "August" },
new { Value = "9", Text = "September" },
new { Value = "10", Text = "October" },
new { Value = "11", Text = "November" },
new { Value = "12", Text = "December" }
},
"Value", "Text", ""), "--Select Month--", new { @class = "form-control select", @tabindex = (6 + a++) })