IEnumerable cannot be used with type arguments

superedatingrus

New Member
I like to use a data list for showing user name and comments and attaches for each comment below of the user name.I have a user control \[code\]ReviewList\[/code\]for showing the comments and \[code\]efiles\[/code\] in that. But I have error in this line (s.tblDraft.Comments). and I have error: \[code\]The non-generic type 'System.Collections.IEnumerable' cannot be used with type arguments\[/code\]Please help what is the problem.\[code\]private void Displayuser(){ var reviews = (from s in _DataContext.tblSends from u in _DataContext.Users where (s.DraftId == _Draftid) && (s.ToEmailId == u.ID) orderby u.Name select new{ userid = u.ID, username = u.Name, comments =s.tblDraft.Comments, w = s.tblDraft.Comments.SelectMany(q => q.CommentAttaches)}).Distinct(); DataList1.DataSource = reviews; DataList1.DataBind(); var theReview = reviews.Single(); DisplayReviews(theReview.comments, theReview.w);}private void DisplayReviews(IEnumerable<Comment> comments, IEnumerable<CommentAttach> w){ ReviewList reviewList = (ReviewList)DataList1.FindControl("ReviewList1"); reviewList.Comments = comments; reviewList.CommentAttachs = w; reviewList.DataBind();}\[/code\]
 
Back
Top