Twistar 0 Newbie Poster

Hello!
I am making a simple web application with a database. I want to show all the members from a specific group. The group is selected in a drop down list which is populated from my sql database table tblGrupper. I have managed to populate a GridView with the groupID and the MemberID, but i cant get the MemberName and MemberLastname in the same GridView. I want all this to happen when i click a button.
my code:

protected void btnVisGruppeMedlemmer_Click(object sender, EventArgs e)
        {
            int gruppe = Convert.ToInt32(ddlVisMedlemmer.SelectedItem.Value);

            SportClassesDataContext db = new SportClassesDataContext();

            var query1 = from tblGruppeMedlemmer in db.tblGruppeMedlemmers
                        where tblGruppeMedlemmer.gruppeID == gruppe
                        select tblGruppeMedlemmer;

            gvVisGruppeMedlemmer.DataSource = query1;
            gvVisGruppeMedlemmer.DataBind();

        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.