Respected Sir....
i have a gridview inside them a radiobuttonlist taken by me.
but when itry to findout whic radio button has been clicked it shows error, i am really tired .
looking for your reply....
From Shashi shekhar singh
i have a gridview inside them a radiobuttonlist taken by me.
Code:
<asp:GridView ID="QuestionView1" runat="server" AutoGenerateColumns="False" Width="262px" PageSize="3" AllowPaging="True"> <PagerSettings NextPageText="" PreviousPageText="" Visible="False" /> <Columns> <asp:TemplateField HeaderText="Questions"> <ItemTemplate> <tr> <td> <iframe src="<%# Container.DataItem %>" height="450" width="800"></iframe></td> </tr> <tr> <td align="center" bgcolor="Yellow"> <asp:RadioButtonList ID="Answerlist" runat="server" RepeatDirection="Horizontal" ID="radiolist" Font-Bold="True" ForeColor="#0099FF" TextAlign="Left"> <asp:ListItem Value="001" Text="Answer 1" ></asp:ListItem> <asp:ListItem Value="002" Text="Answer 2"></asp:ListItem> <asp:ListItem Value="003" Text="Answer 3"></asp:ListItem> <asp:ListItem Value="004" Text="Answer 4"></asp:ListItem> </asp:RadioButtonList> </td> </tr> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
Code:
RadioButtonList rdo = (RadioButtonList)QuestionView1.Rows[0].FindControl("Answerlist"); Response.Write("value has been selected" + rdo.SelectedValue + "<br/>");
From Shashi shekhar singh
Comment