我的 asp.net 页面中有一个数据列表。我在代码隐藏中将数据源绑定到它,并且在此数据列表中有一个复选框。
var n = from gi in DataContext.Context.GalleryImages
join g in DataContext.Context.Galleries
on gi.GalleryID equals g.GalleryID
where g.UserID == UserID && gi.GalleryID==GalleryID
select new
{
GalleryID = g.GalleryID,
ImageDescription = gi.ImageDescription,
GalleryName = g.GalleryName,
ImageFileName = gi.ImageFileName,
IsAlbumImage = gi.IsAlbumImage,
ImageID=gi.ImageID
};
dlGalleryList.DataSource = n;
dlGalleryList.DataBind();
当“IsAlbumImage”为真时,应选中复选框。如何将此属性绑定到复选框?