I appreciate that this can be a pretty simple question, but I have quite a few problems (as an advanced ASP.NET developer). I got a lot of ideas from SO and Google without any luck, and I think I'm starting to think too much about it, it seems like such a standard scenario that I think I'm missing something obvious.
I have, for example, three tables of standard examples - pay attention to the many-to-many relationships.
Students - student_id - forename - surname Courses - course_id - course_name StudentCourses - studentcourse_id - course_id - student_id
I would like to display them on my ASP.NET 3.5 web application so that it looks something like this (the last column is a button that allows them to edit student information):
Students: # Name Courses Actions 1 Joe Bloggs Maths, English [Manage] 2 Arthur Sleep English [Manage] 3 Andy Mann Maths, German, French [Manage]
The Courses column is a list of courses in which the student is currently enrolled. It can be empty (not yet registered) or contain a list (comma-delimited or standard unordered HTML list, I am not valuable) of their currently registered courses. This will not be a mass list, as a student can only enroll in several courses at any time.
I tried a number of solutions ranging from asp: Repeater to my current favorite, ListView, which comes with 3.5. I use LINQ to SQL as my data layer (in case this is important because of the complex LINQs support for Many-to-Many relationships).
source share