Hi I want to make dynamic check boxes(not a checkbox list) with xml but I am having trying to find tutorials on how to do this.
I also need them to explain almost everything in there code since I am new to C# and xml and asp.net.
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
aaPosted Aug 7, 2007, 1:17 AM
So I am using a database that will have say 10values letters and 10image urls in it. So I am going to make a check box for each one and a image box for each one.
I have managed to make the text boxes appear and the images but I want the user to choose what check boxes they want and then hit a button. When they hit the button it would go through all the checkboxes and see if they where selected(this is where I run into problems).
However I am doing all this code in the page_load and it seems that after it has finished loading those boxes that where made can't be access. So now I can't check which ones where selected.
So in my button I have
protected void Button1_Click(object sender, EventArgs e)
{
if (test.Checked == true)
{
ArrayList arrary = new ArrayList();
arrary.Add(test.ID);
Response.Write(test.ID + "checked" + "
");
}
}
So the line where I have test.checked, test being the checkbox object name does not work since it can't access it anymore
Here is my full code
So this leads me to believe that I am not putting my code in the right place. So what am I doing wrong?Munir ShaikhPosted Aug 7, 2007, 1:04 AM
Check this URL this might help you.
http://communityserver.org/forums/p/465795/500344.aspx
Regards,
>>Munnamax