Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Checkbox in ListBox

Reply
Thread Tools

Checkbox in ListBox

 
 
Edmilson
Guest
Posts: n/a
 
      06-27-2003
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.

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

tks all
troqui


 
Reply With Quote
 
 
 
 
Edmilson
Guest
Posts: n/a
 
      06-27-2003
Sorry, the correct subject should be Checkbox in Datalist

"Edmilson" <(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> 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.
>
> Im using VB and I hope you can point me in the right direction...
>
> tks all
> troqui
>
>



 
Reply With Quote
 
 
 
 
Charlie Nilsson [MSFT]
Guest
Posts: n/a
 
      06-27-2003
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" <(E-Mail Removed)>
> References: <(E-Mail Removed)>
> 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#(E-Mail Removed)>
> 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" <(E-Mail Removed)> escreveu na mensagem
> news:(E-Mail Removed)...
> > 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.
> >
> > Im using VB and I hope you can point me in the right direction...
> >
> > tks all
> > troqui
> >
> >

>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox selection to populate another listbox? Chris Kettenbach ASP .Net 3 06-16-2005 09:19 PM
Listbox item added with client scripts not submitting with ASP:Listbox Simon Prince ASP .Net 2 10-19-2004 04:11 PM
How do I move all items in a listbox to another listbox kent ASP .Net 1 05-03-2004 12:17 AM
click listbox and refresh another listbox DC Gringo ASP .Net 0 04-06-2004 02:13 AM
Re: now desparate! - 1st listbox contents disappears when 2nd listbox appears? blenderdude ASP .Net 0 08-03-2003 10:18 PM



Advertisments