Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Professional C#, 2nd and 3rd Editions
|
BOOK: Professional C#, 2nd and 3rd Editions
This is the forum to discuss the Wrox book Professional C#, 3rd Edition by Simon Robinson, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner, Bill Evjen; ISBN: 9780764557590
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C#, 2nd and 3rd Editions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2006, 04:35 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to extract data from Dynamic Checkboxes?

Hi

I am trying to build an application where checkboxes are getting generated based on data from back-end like:

private void Button2_Click(object sender, System.EventArgs e)
{
.................
chkList1 = new CheckBoxList();
chkList1.ID = "MachineList";
...............................................
.................................................. ..
sdr1 = dbc3.execQuerry("SELECT ...................");

while(sdr1.Read())
{
location = sdr1[0].ToString();
// populate the check box list

ListItem listItem = new ListItem();
listItem.Value = location1;
listItem.Text = location;

chkList1.Items.Add(listItem);
}
}
//adding the chkList to Panel
Panel1.Controls.Add(chkList1);

But now I have a button "Use" which takes the checked values from these dynamic CheckBoxList s. But my question is how to extract the values?

Whenever I click on "use" the page reloads, erasing the checkboxes and hence my chances to retrive any "clicked" chekboxes from them!

Any help will be greatly appreciated.



leothelion123





Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract data out from datareader yukijocelyn ASP.NET 2.0 Basics 1 September 21st, 2007 07:27 AM
Dynamic Checkboxes using dynamic Select Values bsheridan Classic ASP Databases 0 March 12th, 2006 10:17 AM
Extract Data From Node ryanpatrick XML 1 February 18th, 2004 10:31 AM
multiple dynamic checkboxes mlog Classic ASP Basics 0 February 14th, 2004 04:49 AM
Dynamic form checkboxes Claralu Classic ASP Databases 2 August 5th, 2003 12:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.