2013-01-23 2 views
0

나는 MyDataTable을 가졌습니다. 그것은 이름 Title 내가 x.title이 dtTmp 어떤 항목의 Title 값을 equel하지 않을 경우 코딩 할linq 쿼리 작성 SiteMap

DataTable dtTmp = new GetDatas(); /* GetDatas function returns MyDataTable type*/ 

rptImages.DataSource = SiteMap.ChildNodes.Cast<SiteMapNode>().Where(x => x.Title != /*dtTmp[index]["Title"]*/); 

와 열이 있습니다.

쉽게 코딩하는 방법은 무엇입니까?

답변

0

당신이 사용하는 경우 :

rptImages.DataSource = SiteMap.ChildNodes.Cast<SiteMapNode>().Where(
    x => dtTmp.Select("Title='"+x.Title.Replace("'","''")+"'").Length==0); 

는 제목의 칼럼에서 찾을 수없는 항목을 얻을.