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

  • Home
  • SEARCH
  • 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 295785
In Process

The Archive Base Latest Questions

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

I am trying to execute the code below to list the select item in

  • 0

I am trying to execute the code below to list the select item in a checkbox

to the body of the mail

 Dim CheckedValues As String
                For Each item In txt_panview0_ddinput1.Items
                    If item.checked Then
                        checkedValues = checkedValues & item.selectedValue

                    End If
                Next
                If Not String.IsNullOrEmpty(checkedValues) Then
                    checkedValues = checkedValues.Substring(1)
                End If


                tempCollector = tempCollector + "<br>" + "Area Name" + ": " + checkedValues

But i am getting the following error ..

System.MissingMemberException: Public member 'checked' on type 'ListItem' not found. 
at Microsoft.VisualBasic.CompilerServices.Symbols.Container.GetMembers(String& MemberName, 
Boolean ReportErrors) at Microsoft.VisualBasic.CompilerServices.NewLateBinding.
LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] 
TypeArguments, Boolean[] CopyBack) at WebApplication1._Default.collectEmailBodyText() 
in C:\UseFormCode\UseFormEnhWorking\Default.aspx.vb:line 271 

Please help

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

    Typecast each item in the iteration to a CheckBox before checking if it’s checked:

    For Each item In txt_panview0_ddinput1.Items
         dim c as CheckBox = Ctype(item.Value, CheckBox)
         If c.checked Then
             checkedValues = checkedValues & item.selectedValue
        End If
    Next
    

    To enable selection of multiple values, set the SelectionMode property of the ListBox to Multiple :

    <asp:ListBox ID="ListBox1" runat="server" SelectionMode="Multiple"></asp:ListBox>
    

    Then to iterate over the selected values, use the following:

    For Each item as ListItem In txt_panview0_ddinput1.Items
             If item.Selected Then
                 CheckedValues = CheckedValues & item.Value
            End If
    Next
    

    PS I’m a bit rusty on VB.Net syntax so my code may not be syntactically perfect

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to execute the below code from a console app. ConfigurationSection aggregatedFileSection
Trying to get the code below to work but the success doesn't execute -
I am trying to execute this SQL command: SELECT page.page_namespace, pagelinks.pl_namespace, COUNT(*) FROM page,
I hit this error while my web application was trying to execute a SELECT
I'm trying to get the code below to work..... The error: ERRORSQLSTATE[42000]: Syntax error
I trying to get yahoo prices into sqlite... I have the code below, but
I have 2 macros below that I am trying to execute 1 after another
I'm just learning ruby and trying to understand the scope of code executed in
I am trying to execute this SQL query prior to restoring a .BAK file
I am trying to execute a stored procedured from a linked database in MS

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.