Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Checkbox in ListBox

    Hello All

    I have a Datalist where each "Item" contains a checkbox (among other
    things). I want the user to be able to click on one or more
    checkboxes, click the Send button, and have something done to the
    Items that had the check boxes selected. Seems like a common task. I
    was easily able to do something like this in classic ASP. But I'm
    lost in ASP.NET.

    I´m using VB and I hope you can point me in the right direction...

    tks all
    troqui


    Edmilson Guest

  2. Similar Questions and Discussions

    1. Checkbox inside listbox
      Hi all I would like to know whether anybody has any ideas about how to create a listbox with checkbox appearing besdies all the option text. I...
    2. Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked.
      I am trying to update the database field when the checkbox is clicked. I am trying to modified the following solution but.. got stuck on the...
    3. click listbox and refresh another listbox
      Can someone guide me to a resource on building set of drill-down listboxes? Basically I want to have 4 listboxes. The first starts out with...
    4. Item label displays as "," when moving from listbox to listbox
      I have 2 listboxes: "lb_unselected" and "lb_selected". The first thing in the actions is loop through an array populating these two listboxes. ...
    5. now desparate! - 1st listbox contents disappears when 2nd listbox appears?
      On 23 Jun 2003 12:57:45 -0700, KathyBurke40@attbi.com (KathyB) wrote: Its been a while since you posted but I will answer anyway. The problem...
  3. #2

    Default Re: Checkbox in ListBox

    Sorry, the correct subject should be Checkbox in Datalist

    "Edmilson" <troqui@padtec.com.br> escreveu na mensagem
    news:Oii7qJKPDHA.1612@TK2MSFTNGP11.phx.gbl...
    > Hello All
    >
    > I have a Datalist where each "Item" contains a checkbox (among other
    > things). I want the user to be able to click on one or more
    > checkboxes, click the Send button, and have something done to the
    > Items that had the check boxes selected. Seems like a common task. I
    > was easily able to do something like this in classic ASP. But I'm
    > lost in ASP.NET.
    >
    > I´m using VB and I hope you can point me in the right direction...
    >
    > tks all
    > troqui
    >
    >

    Edmilson Guest

  4. #3

    Default Re: Checkbox in ListBox

    You might try something like this, in your event handler or IsPostBack
    section of your Page_Load...

    For Each obj In dlist.Items
    If obj.GetType Is System.Web.UI.WebControls.CheckBox Then
    checkbox = CType(obj,
    System.Web.UI.WebControls.CheckBox)
    If checkbox.Checked Then
    Response.Write("You checked #" & checkbox.ID)
    End If
    End If
    Next


    Hope that helps.



    Charlie Nilsson [msft]
    Visual Studio Update

    --

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    [url]http://www.microsoft.com/info/cpyright.htm[/url]

    Note: For the benefit of the community-at-large, all responses to this
    message are best directed to the newsgroup/thread from which they
    originated.
    --------------------
    > From: "Edmilson" <troqui@padtec.com.br>
    > References: <Oii7qJKPDHA.1612@TK2MSFTNGP11.phx.gbl>
    > Subject: Re: Checkbox in ListBox
    > Date: Fri, 27 Jun 2003 08:56:30 -0300
    > Lines: 21
    > X-Priority: 3
    > X-MSMail-Priority: Normal
    > X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
    > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
    > Message-ID: <OSBi#MKPDHA.2224@TK2MSFTNGP10.phx.gbl>
    > Newsgroups: microsoft.public.dotnet.framework.aspnet
    > NNTP-Posting-Host: apolo.padtec.com.br 200.228.158.130
    > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
    > Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:155398
    > X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    > Sorry, the correct subject should be Checkbox in Datalist
    >
    > "Edmilson" <troqui@padtec.com.br> escreveu na mensagem
    > news:Oii7qJKPDHA.1612@TK2MSFTNGP11.phx.gbl...
    > > Hello All
    > >
    > > I have a Datalist where each "Item" contains a checkbox (among other
    > > things). I want the user to be able to click on one or more
    > > checkboxes, click the Send button, and have something done to the
    > > Items that had the check boxes selected. Seems like a common task. I
    > > was easily able to do something like this in classic ASP. But I'm
    > > lost in ASP.NET.
    > >
    > > I´m using VB and I hope you can point me in the right direction...
    > >
    > > tks all
    > > troqui
    > >
    > >
    >
    >
    >
    Charlie Nilsson [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139