MVC dropdown viewbag selecte value
Hi,
In my MVC 5 application one drop down list. below is my code.
var appWorld = from w in sp_app()
select w;
ViewBag.world = new SelectList(appWorld, "id", "name", ApplicationWorlds); // world
@Html.DropDownList("world")
if (Edit_old.world_id !=app_new.world_id && external_applications_new.world_id != null)
{
string worldid = "world_id" + "--->" + Edit_old.world_id + "<---" + app_new.world_id;
Edit_old.world_id = app_new.world_id;
list.Add(worldid);
}
Its not working. can some one help.