Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9129875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:50:49+00:00 2026-06-17T07:50:49+00:00

I am new to web dev and using controls so please forgive me. I

  • 0

I am new to web dev and using controls so please forgive me.

I have a GridView with check boxes in it (please see markup below)

When a user goes through and checks any boxes and hits my submit button
I want to run LINQ query to get all the rows with the checkbox1.checked = True

Something like:

Dim sList = (From row in Gridview1
             Where row.Cells("IsStarFleet") = True
             row.Cells("ID)).ToList

Markup:

<asp:GridView ID="GridView1" runat="server" Width="516px" AutoGenerateColumns="False" AllowPaging="True">
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" />
        <asp:BoundField DataField="FirstName" HeaderText="FirstName" />
        <asp:TemplateField HeaderText="IsStarFleet">
            <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack ="False" />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:50:50+00:00Added an answer on June 17, 2026 at 7:50 am

    You need to use FindControl for controls in a TemplateField and Cells(index) for BoundFields:

    Dim checkedIDs = From row In GridView1.Rows.Cast(Of GridViewRow)()
                     Where DirectCast(row.FindControl("CheckBox1"), CheckBox).Checked
                     Select row.Cells(0).Text
    Dim checkedIdList = checkedIDs.ToList()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to C++, recently I have been learning web-dev languages. I have a
I'm an iphone developer - new to web dev, so please be patient! I'm
Every new web service you create using visual studio comes with a predefined namespace
I have designed a new web site. I have hosted it online. I want
I have started a new web application and have decided to use jquery as
Hi I'm starting a new web development project with my team using Hibernate and
I normally do my web dev using Firefox - I periodically test for cross
I'm building a local vm for doing web dev rather than using our on
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
I am pretty new to web dev and thought I needed a 20gb shared

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.