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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:31:37+00:00 2026-06-18T11:31:37+00:00

I am creating a form with multiple CheckBoxLists (8 total) like this: Configurar el

  • 0

I am creating a form with multiple CheckBoxLists (8 total) like this:

Configurar el Sistema (1-3 horas)
<asp:CheckBoxList runat="server" ID="Configurar">
<asp:ListItem ID="ECheckBox1" class="submenu" runat="server"  Text="Personal"/>
<asp:ListItem ID="ECheckBox1a" class="submenu"  runat="server" Text="Seguridad del Sistema"/>
 <asp:ListItem ID="ECheckBox1b" class="submenu"  runat="server" Text="Configuración del     agencia (sitios, salones)"/>
 <asp:ListItem ID="ECheckBox1c" class="submenu"  runat="server" Text="Configuración de los módulos (elegibilidad, requisitos de salud)"/>
 <asp:ListItem ID="ECheckBox1d" class="submenu"  runat="server" Text="Configuración del sistema (preferencias, Campos de específicos a su agencia)"/>
 <asp:ListItem ID="ECheckBox1e" class="submenu"  runat="server" Text="Utilidades  del Database (archivo, función de adiestramiento)"/>
 <asp:ListItem ID="ECheckBox1f" class="submenu"  runat="server" Text="Los datos de registro historia"/>
 <asp:ListItem ID="ECheckBox1g" class="submenu"  runat="server" Text="Configuración del PIR"/>
 <asp:ListItem ID="ECheckBox1h" class="submenu"  runat="server" Text="Configurar Data en vivo"/>
</asp:CheckBoxList>

On SubBtn.Click, the selected items would go into an email. I’m using this to loop through the first CheckBoxList:

    Dim ConfigurarChkVal As String = String.Empty

    For Each item As ListItem In Configurar.Items

        If item.Selected Then
            ConfigurarChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(ConfigurarChkVal) Then
        ConfigurarChkVal = ConfigurarChkVal.Substring(1)
    End If

    Dim EmailBody As String
    EmailBody = EmailBody + "<p style=" + "font-family:Verdana;" + ">" + ConfigurarChkVal + "</p>"

It returns:

Configurar el Sistema

ersonal

Seguridad del Sistema

Configuración del agencia (sitios, salones)

Configuración de los módulos (elegibilidad, requisitos de salud)

Configuración del sistema (preferencias, Campos de específicos a su agencia)

Utilidades del Database (archivo, función de adiestramiento)

Los datos de registro historia

Configuración del PIR

Configurar Data en vivo

So it cuts off the first letter of the first selected value. How do I solve this? It’s not really the main problem though — If I try to use the same code for the remaining CheckBoxLists, it only returns the last CheckBoxList instead of all 8 in the email.

I’m not sure if there’s an easier way, but any advice would be appreciated.


The code for all 8:

    Dim EntradaChkVal As String = String.Empty

    For Each item As ListItem In FamilyServices.Items

        If item.Selected Then
            EntradaChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(EntradaChkVal) Then
        EntradaChkVal = EntradaChkVal.Substring(0)
    End If


    Dim HealthChkVal As String = String.Empty

    For Each item As ListItem In Health.Items

        If item.Selected Then
            HealthChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(HealthChkVal) Then
        HealthChkVal = HealthChkVal.Substring(0)
    End If

    Dim FamilyChkVal As String = String.Empty

    For Each item As ListItem In FamServices.Items

        If item.Selected Then
            FamilyChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(FamilyChkVal) Then
        FamilyChkVal = FamilyChkVal.Substring(0)
    End If


    Dim AdminChkVal As String = String.Empty

    For Each item As ListItem In Admin.Items

        If item.Selected Then
            AdminChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(AdminChkVal) Then
        AdminChkVal = AdminChkVal.Substring(0)
    End If

    Dim StatusChkVal As String = String.Empty

    For Each item As ListItem In StatusCenter.Items

        If item.Selected Then
            StatusChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(StatusChkVal) Then
        StatusChkVal = StatusChkVal.Substring(0)
    End If


    Dim ReportsChkVal As String = String.Empty

    For Each item As ListItem In Informes.Items

        If item.Selected Then
            ReportsChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(ReportsChkVal) Then
        ReportsChkVal = ReportsChkVal.Substring(0)
    End If
    Dim OptionalChkVal As String = String.Empty

    For Each item As ListItem In Opciones.Items

        If item.Selected Then
            OptionalChkVal += item.Value + "<br />"
        End If
    Next
    If Not [String].IsNullOrEmpty(OptionalChkVal) Then
        OptionalChkVal = OptionalChkVal.Substring(0)
    End If

I realized the issue was this:
EmailBody = EmailBody + “Configurar el Sistema ” + “

”
EmailBody = EmailBody + “” + ConfigurarChkVal + “

“

        EmailBody = "<p style=" + "font-family:Verdana;" + "><p style=" + "font-family:Verdana;" + "><strong>Informacion de entrada para la familia y matriculados </strong> " + "</p><p></p>"
        EmailBody = EmailBody + "<p style=" + "font-family:Verdana;" + ">" + EntradaChkVal + "</p>"

I left out the EmailBody + on each of the concurrent statements, which started the EmailBody over again.

  • 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-18T11:31:39+00:00Added an answer on June 18, 2026 at 11:31 am

    Strings are indexed starting at zero so ConfigurarChkVal.Substring(1) should be ConfigurarChkVal.Substring(0)

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

Sidebar

Related Questions

I was creating a form like this : if select b, the textbox is
I am creating 10 forms dynamically for example form would be like this <form
I am creating a form using Cake.In the form there is a $this->Form->button($i); element.
I have this static method for a model, which is creating multiple records. This
I'm creating an MVC form, and I have multiple checkboxes and two drop down
I am creating an online order form for multiple products. I need to calculate
When creating a form using three20 components with the methodology found in this example
I'm currently creating a search form which will send a request to the server
I am creating a multiple-step form using jQuery and I am just in the
I am creating a form with multiple checkboxes with the same name. I have

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.