So i'm making my own Blog, and it's going to be simple the general layout is:
DATE - POST TITLE
- - - - - - - - - - - - - - - - -
POST CONTENTS
- - - - - - - - - - - - - - - - -
TAGS | COMMENT LINK(NUMBER OF COMMENTS)
So i've used a GridView, and supplied an SqlDataSource all works well, but now i'm trying to incorporate the TAGS feature, but it's kind of hard to do it all in the one single query, i don't think it's even possible.
My current schema goes something like this
Post - PostID_PK, Post title, etc
Comment - CommentID_PK, CommentContents, PostID_FK
Tag - TagID_PK, TagName
Tag_Post - Tag_Post_ID_PK, TagID_FK, PostID_FK
So that's the general layout, for my SqlDataSource i've got a query that will fetch all Posts, and also fetch the number of comments for each post, just a count. Works all well. But now i need to fetch all the Post_Tag records for EACH post, the results will be strange and i'm not sure how it'll work out in DataBinding.
My next step is to make my own custom data source objects, but i'm not exactly sure how i should model my custom data source objects for me to make my <%# Eval("FieldName") %> calls work still inside my aspx page.
Thank you in advance.
Winston
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.