I'm using LINQ to SQL to grab information from my SQL database. I have a GridView which shows all the top level information - in this case a list of groups (i.e. admin, users and so on). When a user clicks say the admin group, I want to be able to show each member in that group. I have the following code which grabs the information from the database:
DataClassesDataContext dc = new DataClassesDataContext();
GridViewRow row = GridView1.SelectedRow;
var query1 = from p in dc.Users
where p.groups.GroupID == Int32.Parse(row.Cells[1].Text)
select new
{
p.Name,
p.Address,
p.Contact Number,
p.Bio,
};
I know that I can use GridView again to display the results of the query, but this doesn't really look nice as it shows too much information at once. How would I go about having some sort of display which will show just one user at a time, giving me the chance to click next and back?