Can someone point me to an article that shows the dropdownlist being populated from linq to sql (text and value being set).
Thanks Danny
If you need to add html attributes to your tags this would be a way of doing it. Pass a Model to your View e.i. "return View(someModel)" then in the View:
<% foreach (SelectListItem item in Model.GroupsDropDown) { if (item.Selected) {%> <%= item.Text%> <%} else {%> <%= item.Text%> <%} %> <% } %>
GroupsDropDown is a property in your Model like this:
public IEnumerable GroupsDropDown { get; set; }