I have a RadioButtonList
inside the GridView
However, in code behind, I cannot access the RadioButtonList
, but I can access GridView
control.
This is the html markup
<body>
<form id="form1" runat="server">
<asp:GridView ID="gvQuestion" runat="server" AutoGenerateColumns="false" DataKeyNames="Id" OnRowDataBound="gvQuestion_RowDataBound">
<Columns>
<asp:TemplateField runat="server">
<ItemTemplate>
<asp:Label ID="lblQuestion" runat="server" Text='<%# Eval("Question")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButtonList ID="rblOptions" runat="server"></asp:RadioButtonList>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</form>