How to bind ArrayList to DropdownList in Asp.Net?


Hi friends, I am a learner of Asp.Net & want to learn binding ArrayList to DropdownList in Asp.NeT. Its my first so post hoping great support & suggestions.


It’s not clear from the question whether you use WebForms or ASP.NET MVC, you may want to specify the UI framework you use.


eyalsk i will use ASP.NET MVC

 <select name="dowList" id="dowList">
    @{string[] weekRagne = new string[] { "Sun", "Mon", "Tues", "Wed" };}
    @foreach (var week in weekRagne)
        <option value="@week">@week</option>

.NET Foundation Website | Blog | Projects | Code of Conduct