[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

=?Utf-8?B?cm9kY2hhcg==?=

2/23/2004 9:11:00 AM

H

I am adding checkboxes to a Web Forms Page Programmatically and that works fine

My problem is that i want to know which checkbox that is i checked/unchecked
And it could be upp to 100 checkboxes with different states

//Magnus
2 Answers

CMA

2/23/2004 10:55:00 AM

0

try with this code

foreach(Control test in page1.Controls)
{
if(Control.Type = System.Web.WebControls.CheckBox)
{
CheckBox temp = (CheckBox) test;
{
if(temp.Checked)
{
//do the processing here
}
}
}

hope this helps,
CMA

"Magnus" <anonymous@discussions.microsoft.com> wrote in message
news:F4042DF8-934A-4101-8E16-89FB0F20D0ED@microsoft.com...
> Hi
>
> I am adding checkboxes to a Web Forms Page Programmatically and that works
fine.
>
> My problem is that i want to know which checkbox that is i
checked/unchecked.
> And it could be upp to 100 checkboxes with different states.
>
> //Magnus


=?Utf-8?B?cm9kY2hhcg==?=

2/23/2004 12:11:00 PM

0

This wasnt the solution i wanted
Because i dont want to loop through all the checkboxes
I just want to know which checkbox that has been checked/unchecked.