Need Help with a repeater and web custom control

Discussion in 'ASP .Net Web Controls' started by anon@anon.com, Mar 11, 2005.

  1. Guest

    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
    , Mar 11, 2005
    #1
    1. Advertising

  2. Dave Friedel Guest

    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

    <> wrote in message
    news:...
    >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
    >
    Dave Friedel, Mar 13, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JAPHET
    Replies:
    1
    Views:
    412
    Scott Allen
    Oct 11, 2004
  2. Replies:
    0
    Views:
    333
  3. =?Utf-8?B?SmF5YnVmZmV0?=
    Replies:
    9
    Views:
    847
    Phillip Williams
    Feb 21, 2006
  4. Need Help with a repeater and web custom control

    , Mar 11, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    113
  5. JAPHET

    Help using Repeater with Web Custom Control

    JAPHET, Oct 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    JAPHET
    Oct 11, 2004
Loading...

Share This Page