Catching events

M

Magnus

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
 
C

CMA

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
 
M

Magnus

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,075
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top