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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:11:50+00:00 2026-05-29T06:11:50+00:00

I am working with listview in C# webapplication. My Problem is I want checked

  • 0

I am working with listview in C# webapplication. My Problem is I want checked Items from the listview . I have try with find selecteditem and all. I dont know how to get checked items from checkbox inside listview.My code is as follows:-

aspx

    <asp:ListView ID="PackagesListView" runat="server" DataSourceID="PackagesDataSource" ItemPlaceholderID="itemPlaceholder" 
      GroupItemCount="4" GroupPlaceholderID="groupPlaceholder" OnItemDataBound="PackagesListView_ItemDataBound">
    <LayoutTemplate>
      <table style="margin-left:0px; width:570; table-layout:fixed; overflow:hidden;">
        <tr ID="groupPlaceholder" runat="server" >
        </tr>
      </table>
    </LayoutTemplate>
    <GroupTemplate>
      <tr class="productsTableRow">
        <td ID="itemPlaceholder" runat="server"></td>
      </tr>
    </GroupTemplate>

    <ItemTemplate>
      <td style="width:140px;">
        <div style="text-align:center; line-height:1.5;"><asp:Label ID="PackageLabel" runat="server" Text='<%#Eval("Name")%>' /></div>
        <div style="text-align:center;"><asp:CheckBox ID="PackageCheckBox" runat="server" OnCheckedChanged="OnPackageSelected" AutoPostBack="true" PackageID='<%#Eval("PackageID")%>' /></div>
      </td>
    </ItemTemplate>
  </asp:ListView>
   <asp:Button ID="ButtonSaveQuotation" runat="server" Text="Save Quotation" 
                  CssClass="button" Visible="false" onclick="ButtonSaveQuotation_Click1" />

aspx.cs

     protected void ButtonSaveQuotation_Click1(object sender, EventArgs e)
    {
        StringBuilder sb = new StringBuilder();


    }

so here in sb I want to append text of all the label whose checkboxes are checked.Thank You

  • 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-05-29T06:11:52+00:00Added an answer on May 29, 2026 at 6:11 am

    You will have to find the checkbox since it’s inside the template field
    Example:

    if (PackagesListView.Items.Count > 0)
    {                
        for (int i = 0; i < PackagesListView.Items.Count; i++)
        {
            CheckBox PackageCheckBox= (CheckBox)PackagesListView.Items[i].FindControl("PackageCheckBox");
            if (PackageCheckBox!= null)
            {
                if (PackageCheckBox.Checked.Equals(true))
                {
                    //do your stuff here
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am working in windows application with c#.Am creating the listview items dynamically..i want to
I have done Muticolum listview onListItemClick .Its working fine.Problem is This line String selection
I am working on an app that requires removing items from a ListView on
I'm working on project with listview,but I have a little problem. I'm using SimpleAdapter
Been trying to find a working implementation of a WPF listview (or listbox) where
I'm working on a control to tie together the view from one ListView to
I'm new to android. I have worked in searchbar using Listview and it's working
i have an android application which has a listview for listing 14 items inside
I have just started working with Android ListView . However, setAdapter function in my
I'm working on a layout where I use a ListView with RelativeLayout line items.

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.