473,508 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Nov 17 '05 #1
2 9027
Sorry, the correct subject should be Checkbox in Datalist

"Edmilson" <tr****@padtec.com.br> escreveu na mensagem
news:Oi**************@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

Nov 17 '05 #2
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
http://www.microsoft.com/info/cpyright.htm

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" <tr****@padtec.com.br>
References: <Oi**************@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: <OS**************@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" <tr****@padtec.com.br> escreveu na mensagem
news:Oi**************@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



Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8880
by: Bill Dudek | last post by:
Does vb.net have a listbox with a checkbox style like in vb6? I didn't even see a style option under properties. I'm just starting in .net and am trying to port an existing application over. ...
1
1791
by: Stephen | last post by:
Im very new to coding and I was wondering if anyone could please tell me how to select all the items in a listbox when a checkbox is checked, and then when the checkbox is unchecked to unselected...
4
14500
by: Thomas | last post by:
Hello; I am creating a multiselect listbox and I would like to use checkboxes to indicate which items are selected (rather than the default highlighting.) I would then place these selected items...
3
1767
by: Vaughn | last post by:
I have a textbox in my Win form that can be filled when a user chooses an emplcode from a combobox and when the value is returned from another form (double-clicks on a separate listbox). What...
1
1508
by: Vikram | last post by:
Can we have a listbox containing checkboxes in asp.net. I do not want to use checkbox list control as it does not have scrollbar facility.
2
1757
by: gce | last post by:
What happens : When I first press the button, I get an listbox1 with a,b,c (correct: because of the addtoa(1, "a") addtoa(2, "b") addtoa(3, "c") When I check the checkbox, the eventhandler...
8
10756
by: ameen.abdullah | last post by:
Hi Guys, I have a checked list box on my form.. the purpose of this checkbox is to indicate that the option is enabled or disabled.. I just want to ask if there is a way to disable these check...
3
3830
by: WolfgangD | last post by:
Hi, I have got a prblem: I created a checkbox, this checkbox will get the informations from a text file : FileStream mem_name = new FileStream(pfad, FileMode.Open, FileAccess.Read);...
2
5407
by: dkultasev | last post by:
Hello, I have small script which generates some listboxes. Their names are listXX (list01, list02, list03....). How to check if there are checked or not ? If I have 1 listbox and have it's name I...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.