ASP.net displaying data from SQL data source
Posted
by c11ada
on Stack Overflow
See other posts from Stack Overflow
or by c11ada
Published on 2010-03-27T19:25:50Z
Indexed on
2010/03/27
19:33 UTC
Read the original article
Hit count: 387
ASP.NET
|linq-to-sql
hey all,
im using linq2SQL 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 no i can use gridview again to display the results of the query, but this doesnt really look nice as it shows too much information at one, 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 ?
thanks
© Stack Overflow or respective owner