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 7790899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:43:45+00:00 2026-06-01T21:43:45+00:00

ASPX Page: <asp:ListView ID=lvSubjects runat=server > <LayoutTemplate> <asp:PlaceHolder ID=itemPlaceholder runat=server /> </LayoutTemplate> <ItemTemplate> <asp:CheckBox

  • 0

ASPX Page:

<asp:ListView ID="lvSubjects" runat="server" >
        <LayoutTemplate>
        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
        </LayoutTemplate>
        <ItemTemplate>
            <asp:CheckBox ID="cbRegularSubjects" Text=<%# Eval("SubjectName") %> runat="server" />

        </ItemTemplate>


        <AlternatingItemTemplate>
        <asp:CheckBox ID="cbRegularSubjects" Text=<%# Eval("SubjectName") %> runat="server" />
        </AlternatingItemTemplate>
        </asp:ListView>

Code Behind:

For Each ctrl As Control In Page.Controls
            If TypeOf ctrl Is CheckBox AndAlso CType(ctrl, CheckBox).Checked Then
                '**Here I want to get the text of the check box and insert into the DB**
            End If


       Next

Where am i going wrong??i do not get any error…but this code is not working for me.

  • 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-01T21:43:47+00:00Added an answer on June 1, 2026 at 9:43 pm
    For i As Integer = 0 To lvSubjects.Items.Count - 1
                Dim coll As ControlCollection = lvSubjects.Items(i).Controls
                For Each c As Control In coll
                    If TypeOf c Is CheckBox Then
                        Dim box As CheckBox = CType(c, CheckBox)
                        If box.Checked Then
                            MsgBox(box.Text)
                        End If
                    End If
                Next c
            Next i
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an ASP.NET MVC aspx page I have the following script: <script type=text/c# runat=server>
I have a asp.net repeater control in a aspx page, with runat=server and an
I add this tag to my asp.net page (aspx): <obout:Calendar runat=server ShowTimeSelector=true DateFormat=MM/dd/yyyy hh:mm:ss
Is it possible to call Server.Execute with a .NET .aspx page from classic ASP?
I have come across different symbols in .aspx page of asp.net <%#eval(expr) %> <%#bind(expr)
I am using FckEditor in Create.aspx page in asp.net mvc application. Since I need
I have an ASP.NET page with code-behind in VB.NET. On the ASPX page I
I have an ASP.net aspx page that's composed of 3 iframes. One for the
I have a aspx page that has a UpdatePanel and a asp timer. the
I have a C#/ASP.NET .aspx page that declares two controls that each represents the

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.