J
Jeff
hi
..net 3.5
i'm developing website where people can post comment on articles, and also
post comment on other comments.. nested
All comments belonging to an article has a link to the article, So no matter
what level in the tree the comment is, it always knows what article it is
created for....
In my webpage I want to use an ObjectDataSource which can get the collection
of comments and fill the datacontrol with it... Not sure how to pass a tree
of objects to a ObjectDataSource???
also I'm looking into how to design such nested class. Is it so that I just
create class and then add a field to that class which can hold the levels
underneath it, like this:
public class Comment {
private int _id;
private string _body;
private string _postedby;
private int _article;
private List<Comment> _replies
//I left out constructors etc from this example
}
any suggestions?
..net 3.5
i'm developing website where people can post comment on articles, and also
post comment on other comments.. nested
All comments belonging to an article has a link to the article, So no matter
what level in the tree the comment is, it always knows what article it is
created for....
In my webpage I want to use an ObjectDataSource which can get the collection
of comments and fill the datacontrol with it... Not sure how to pass a tree
of objects to a ObjectDataSource???
also I'm looking into how to design such nested class. Is it so that I just
create class and then add a field to that class which can hold the levels
underneath it, like this:
public class Comment {
private int _id;
private string _body;
private string _postedby;
private int _article;
private List<Comment> _replies
//I left out constructors etc from this example
}
any suggestions?