Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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 Display Modes
  #1 (permalink)  
Old October 8th, 2005, 01:00 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is anybody tell me how to iterate <asp:Checkbox> a

Dear Friend,

Is anybody tell me how to iterate <asp:Checkbox> array loop.

e.g. in PHP

<INPUT TYPE="CHECKBOX" NAME="CHK[]">

I am using foreach loop.


Will you pl guide me for below ASP.Net with C# code.

While (daDetail.Read())
{
   lblLabel.Text += "<input type='checkbox' name='chk[" + daDetail["Module_id"] + i.ToString() + "]' value='A'>Add
}


This will create multiple checkbox. Now I want to know that how to get value of selected checkbox ?


Thanking You,


  #2 (permalink)  
Old October 12th, 2005, 10:19 AM
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

While (daDetail.Read())
{
   chkBoxName = "chk[" + daDetail["Module_id"] + i.ToString() + "]";
   lblValues.Text += Request.Form[chkBoxName] + "<br>";
}

  #3 (permalink)  
Old October 12th, 2005, 11:05 AM
Imar's Avatar
Wrox Author
Points: 71,804, Level: 100
Points: 71,804, Level: 100 Points: 71,804, Level: 100 Points: 71,804, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,050
Thanks: 80
Thanked 1,581 Times in 1,558 Posts
Default

Is this for ASP.NET 2.0, the new ASP.NET version about to be released in November?

If not, please post your question in the 1.x forum, located here:
http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/

If it is for ASP.NET 2.0, can you provide more details? What exactly are you trying to accomplish?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 


Thread Tools
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
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 05:37 AM
problem while using <logic:iterate> tag be_sandip Struts 4 April 27th, 2007 12:27 AM
problem while using <logic:iterate> tag be_sandip BOOK: Professional Jakarta Struts 0 November 13th, 2006 08:05 AM
Is anybody tell me how to iterate <asp:Checkbox> a frmsasp All Other Wrox Books 0 October 8th, 2005 12:56 AM
a problem in book<<beginning asp.net using vb>> luoware ASP.NET 1.0 and 1.1 Basics 3 December 8th, 2003 09:32 PM



All times are GMT -4. The time now is 01:33 AM.


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