TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Simes
NA
1
0
Iterate through check boxes on a repeater control in code behind
Mar 25 2006 6:22 AM
Hi,
I am new to web development and would appreciate some help here. I am dynamic creating check boxes through ASP.net and would like to know how I iterate through them in my code behind to know which ones have been chceck and unchecked. please help if you can. Below is a code snippet from the ASPx part:
<
asp
:
repeater
id
=rptBelbinMaster
runat
="server">
<
headertemplate
>
<
table
class
="datagridNormal"
width
="100%"
border
="1"
>
<
tr
>
<
th
align
="Left">
Question Code
</
th
>
<
th
align
="Left">
Question
</
th
>
</
tr
>
</
headertemplate
>
<
itemtemplate
>
<
tr
class
="datagridNormal"
width
="100%">
<
td
align
="Left">
<%
#
DataBinder
.Eval(Container.DataItem,
"prpQuestionCode"
)%>
</
td
>
<
td
align
="Left"
width
="90%">
<%
#
DataBinder
.Eval(Container.DataItem,
"prpQuestionText"
)%>
</
td
>
</
tr
>
<!-- The below enables the child repeater to see the content of objAnswers.-->
<
asp
:
repeater
runat
="server"
datasource
='
<%# DataBinder.Eval(Container.DataItem, "prpAnswers") %>
'>
<
headertemplate
>
<
table
class
="datagridSecondary"
width
="100%"
border
="1"
>
<
tr
>
<
th
align
="Left">
Answer Code
</
th
>
<
th
align
="Left">
Answer
</
th
>
</
tr
>
</
headertemplate
>
<
itemtemplate
>
<
tr
class
="datagridSecondary"
width
="100%">
<!-- The below enables the child repeater to see the content of objAnswers.-->
<
td
>
<
input
type
="checkbox"
id
="chkAnswer
<%# ((System.Collections.Generic.KeyValuePair<int,clsAnswer>)(Container.DataItem)).Value.prpDetailID %>
"
/>
</
td
>
Reply
Answers (
0
)
e.Item.FindControl("DropdownId") Returning Null
Performing secure communication to a 3'rd party site on the server side - how to?