Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
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 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 8th, 2005, 12:00 AM
Registered User
 
Join Date: Sep 2005
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,


 
Old October 12th, 2005, 09:19 AM
Registered User
 
Join Date: Oct 2005
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>";
}

 
Old October 12th, 2005, 10:05 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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.





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 04:37 AM
problem while using <logic:iterate> tag be_sandip Struts 4 April 26th, 2007 11:27 PM
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 7th, 2005 11:56 PM
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





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