如何将不同的播放列表标题从数据库绑定到复选框列表

时间:2013-05-30 06:28:14

标签: asp.net

private void chkDeletePlaylistBind()      
{     
   chkDeletePlaylist.DataSource = objEntities.Playlists.OrderBy(del => del.PlaylistTitle).Distinct();
   chkDeletePlaylist.DataTextField = "PlaylistTitle";
   chkDeletePlaylist.DataValueField = "PlaylistID";
   chkDeletePlaylist.DataBind();
}

它不会将不同的值带到复选框列表中。请帮我解决这个问题。

0 个答案:

没有答案