public IEnumerable GetList(int? ID)
{
return from s in db.List
orderby s.Descript
select new SelectListItem
Here is what I did, I read my values from an XML file into an IList. I then inserted a new record into the IList at position 0. Then make a select list from the IList.
IList< MY_DATA > mydata = (from tmp in myXML.Descendants("R").ToList()
select new MY_DATA { NR = tmp.Attribute("NR").Value, NA = tmp.Attribute("NA").Value }).ToList
(); mydata.Insert(0, new My_DATA() { NR = "", NA = "--Click to Select--" });
SelectList mylist = new SelectList(mydata, "NR", "NA");