Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Professional C#, 2nd and 3rd Editions
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 11th, 2006, 04:35 AM
Registered User
 
Join Date: Oct 2006
Location: , , India.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.