Set Option button in a repeater to visible

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ra220511
    New Member
    • Oct 2007
    • 11

    Set Option button in a repeater to visible

    Can some please help me.
    Basically i have 3 radio buttons in a repeater.

    <ItemTemplate >

    <asp:RadioButto n ID="rdoAnswer1 " runat="server" text='<%# Eval("Answer1") %>' GroupName='<%# Eval("Question" )%>' Visible="false" ></asp:RadioButton ><br /><br />
    <asp:RadioButto n ID="rdoAnswer2 " runat="server" text='<%# Eval("Answer2") %>' GroupName='<%# Eval("Question" )%>' Visible="false" ></asp:RadioButton ><br /><br />
    <asp:RadioButto n ID="rdoAnswer3 " runat="server" text='<%# Eval("Answer3") %>' GroupName='<%# Eval("Question" )%>' Visible="false" ></asp:RadioButton ><br /><br />

    /ItemTemplate>


    from my vb.net code i want to be able to set each of these to visble if i am going to use them. Its a questioaire i am creating so sometimes i may only need 2 to be visible.
    CAN someone please tell how can i achieve this? if you need any more information please ask.
    I know i need to use the find control but and i can already find the control but cant change its visible property.

    Me.repQuestiona ire.Items(j).Fi ndControl("rdoA nswer" & j).Visible = True (wrong code)

    Thank you in advance
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    What event are you calling the following code in?

    Me.repQuestiona ire.Items(j).Fi ndControl("rdoA nswer" & j).Visible = True (wrong code

    Nathan

    Comment

    Working...