Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how make a group checkbox vb.net (asp.net)

how make a group checkbox vb.net (asp.net)

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadminhelp
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sandraa
    wrote on last edited by
    #1

    Hi all, I have one question very very easy but what I don't know do. With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group. Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties. Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible. Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:

                <asp:Panel ID="Panel1" runat="server" Width="451px" >
                    <asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
                    <asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
                    <asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
                    <asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
                    <asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
                    <asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
                    <asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
                </asp:Panel>
    
                        'Ocultar todos chkDia
                        Dim i As Integer
                        For i = 1 To 7
                            ChkDia(i).Visible = False
    
                        Next
    

    Thanks for your help!

    D Y N K 4 Replies Last reply
    0
    • S Sandraa

      Hi all, I have one question very very easy but what I don't know do. With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group. Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties. Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible. Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:

                  <asp:Panel ID="Panel1" runat="server" Width="451px" >
                      <asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
                      <asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
                      <asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
                      <asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
                      <asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
                      <asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
                      <asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
                  </asp:Panel>
      
                          'Ocultar todos chkDia
                          Dim i As Integer
                          For i = 1 To 7
                              ChkDia(i).Visible = False
      
                          Next
      

      Thanks for your help!

      D Offline
      D Offline
      Dhyanga
      wrote on last edited by
      #2

      Can you explain it more clearly ?

      suchita

      1 Reply Last reply
      0
      • S Sandraa

        Hi all, I have one question very very easy but what I don't know do. With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group. Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties. Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible. Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:

                    <asp:Panel ID="Panel1" runat="server" Width="451px" >
                        <asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
                        <asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
                        <asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
                        <asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
                        <asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
                        <asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
                        <asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
                    </asp:Panel>
        
                            'Ocultar todos chkDia
                            Dim i As Integer
                            For i = 1 To 7
                                ChkDia(i).Visible = False
        
                            Next
        

        Thanks for your help!

        Y Offline
        Y Offline
        Yusuf
        wrote on last edited by
        #3

        Sandraa wrote:

        With vb 6

        Sandraa wrote:

        with vb.net and asp.net

        Well VB6 and asp.net are different. Of course you can use vb.net as code behind. What exactly are you trying to achieve?

        Yusuf May I help you?

        1 Reply Last reply
        0
        • S Sandraa

          Hi all, I have one question very very easy but what I don't know do. With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group. Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties. Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible. Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:

                      <asp:Panel ID="Panel1" runat="server" Width="451px" >
                          <asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
                          <asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
                          <asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
                          <asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
                          <asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
                          <asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
                          <asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
                      </asp:Panel>
          
                              'Ocultar todos chkDia
                              Dim i As Integer
                              For i = 1 To 7
                                  ChkDia(i).Visible = False
          
                              Next
          

          Thanks for your help!

          N Offline
          N Offline
          NeverHeardOfMe
          wrote on last edited by
          #4

          .NET does not directly support control arrays. See here[^] and here[^]

          1 Reply Last reply
          0
          • S Sandraa

            Hi all, I have one question very very easy but what I don't know do. With vb 6 when I want create a group checkbox only I have that copy and paste the same checkbox into panel and vb 6 create the group. Well, with vb.net and asp.net (v.studio 2008) if I copy and paste the name ID is diferent and is not posible create a group with properties. Also I have tried select 2 or 3 checkbox with key "control + click" but nothing is not posible. Later I have tried to put into code the name of group and I don't see errors but I don't know how call later to group, I put you my simple code that I want to do:

                        <asp:Panel ID="Panel1" runat="server" Width="451px" >
                            <asp:CheckBox ID="ChkDia1" runat="server" CssClass="negro11b" Text="Lunes" group="ChkDia" />
                            <asp:CheckBox ID="ChkDia2" runat="server" CssClass="negro11b" Text="Martes" group="ChkDia" />
                            <asp:CheckBox ID="ChkDia3" runat="server" CssClass="negro11b" Text="Miercoles" group="ChkDia"/>
                            <asp:CheckBox ID="ChkDia4" runat="server" CssClass="negro11b" Text="Jueves" group="ChkDia"/>
                            <asp:CheckBox ID="ChkDia5" runat="server" CssClass="negro11b" Text="Viernes" group="ChkDia"/>
                            <asp:CheckBox ID="ChkDia6" runat="server" CssClass="negro11b" Text="Sabado" group="ChkDia"/>
                            <asp:CheckBox ID="ChkDia7" runat="server" CssClass="negro11b" Text="Domingo" group="ChkDia"/>
                        </asp:Panel>
            
                                'Ocultar todos chkDia
                                Dim i As Integer
                                For i = 1 To 7
                                    ChkDia(i).Visible = False
            
                                Next
            

            Thanks for your help!

            K Offline
            K Offline
            Kelly Herald
            wrote on last edited by
            #5

            You could use the CheckBoxList[^] control instead.

            Kelly Herald Software Developer

            S 1 Reply Last reply
            0
            • K Kelly Herald

              You could use the CheckBoxList[^] control instead.

              Kelly Herald Software Developer

              S Offline
              S Offline
              Sandraa
              wrote on last edited by
              #6

              but is not possible call to matrix of checkbox easily, I don't want do it dinamically. why checkbox accept by code add property "group=" and later is not posible use it? I only want put visible or not visible "some" checkbox with a For next. I would like to have a easy sample about it. Thanks very much

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups