hi
i have a checkboxlist
i have a field in database,ites type is boolean
i want when the field is false,show "no" and when true "yes"
i write with linq
can you tell me the solution?
private void BindchLessonPrerequisite()
{
int LId = Convert.ToInt32(ViewState["LessonID"]);
using (Models.mSchoolContext ctx = new mSchoolContext())
{
var item = (from l in ctx.mSchoolLessons
where l.LessonID == LId
select new
{
l.LessonPrerequisite,
pish = l.LessonPrerequisite ? "No" : "Yes"
}
).FirstOrDefault();
chLessonPrerequisite.DataSource = item;///????
...
Go to the complete details ...