Need Help with a repeater and web custom control

A

anon

I am having a hard time with makeing what I am trying to do work. I
am making a questionaire web app. I have a custom control that has a
label and 5 radio buttons. My problem is that each different topic
for the questionaire is in a database and each questionaire will have
a different number of questions. I am trying to use a repeater to
creat multiple copies of the control, unfortunately when I do this the
different controls act like thay are the same. Can anyone give me a
way to do what I am trying? Thanks alot
 
D

Dave Friedel

During the ItemDataBound (in code-behind) - load the unique information for
each question.

Public Sub Repeater_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs) Handles
Repeater.ItemDataBound

Dim labelQuestion As System.Web.UI.WebControls.Label=
e.Item.FindControl("labelQuestion")
labelQuestion .Text = DataBinder.Eval(e.Item.DataItem, "Question")

Regards,
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top