2
我想在c#中創建一個selectlist。我的代碼:不支持ToString()方法
var ceremonies = db.Ceremonies;
var Ceremonies =
from c in ceremonies
select new SelectListItem
{
Text = c.Name + "_" + c.Date,
Value = c.Id.ToString()
};
但是,我在這裏得到了異常,像ToString() method not supported
。有什麼問題 ?