Can I change the html name generated by Html.DropDownListFor?

As @Anar said in the comments;

Actually, you can change the name attribute the same way as id, but instead of “name”, use “Name”. Surprisingly it works.

 @Html.DropDownListFor(x => Model.AdminSummaries[index].Status, 
AdminStatusReference.GetAdminStatusOptions(), 
new { id = string.Format("Status_{0}",index ), Name = "GiveName" });

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)