I have a Question Table
CREATE TABLE Questionbank
(
ID int IDENTITY(1,1) PRIMARY KEY ,
QUESTION nvarchar(max) ,
OPTION1 varchar(max) ,
OPTION2 varchar(max) ,
OPTION3 varchar(max) ,
OPTION4 varchar(max) ,
ANSWER nvarchar(max) ,
question_paper_id varchar(100) ,
CREATED_DATE date DEFAULT (getdate()
)
now i want to add option corresponding to radio button.
my last module is working like this
<asp:GridView EmptyDataText="No record found !" ShowHeader="false" ID="grd" runat="server"
GridLines="None" AutoGenerateColumns="False" HeaderStyle-Height="0px" CssClass="font-decor"
CellPadding="10">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label runat="server" ID="lblId" Text='<%#Eval("ID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<%# Container.DataItemIndex+1 %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<table style="width: 100%;">
<tr>
<td colspan="4">
<b>
<%# Eval("QUESTION") %></b>
</td>
</tr>
<tr>
<td style="width: 20px">
A
</td>
<td style="width: 200px;">
<%-- <asp:RadioButton runat="server" ID="chkboxlist" GroupName="s" AutoPostBack="true" />--%>
<%# Eval("OPTION1")%>
</td>
<td style="width: 20px">
B
</td>
<td style="width: 200px;">
<%-- <asp:RadioButton runat="server" ID="RadioButton1" GroupName="s" />--%>
<%# Eval("OPTION2")%>
</td>
</tr>
<tr>
<td style="width: 20px">
C
</td>
<td style="width: 200px;">
<%-- <asp:RadioButton runat="server" ID="RadioButton2" GroupName="s" />--%>
<%# Eval("OPTION3")%>
</td>
<td style="width: 20px">
D
</td>
<td style="width: 200px;">
<%-- <asp:RadioButton runat="server" ID="RadioButton3" GroupName="s" />--%>
<%# Eval("OPTION4")%>
</td>
</tr>
<tr>
<td colspan="4">
<asp:RadioButtonList ID="CheckBoxList1" CssClass="Font-style" RepeatLayout="Flow"
RepeatDirection="Horizontal" runat="server" AutoPostBack="true" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">
<asp:ListItem Text="A" Value="1">
</asp:ListItem>
<asp:ListItem Text="B" Value="2">
</asp:ListItem>
<asp:ListItem Text="C" Value="3">
</asp:ListItem>
<asp:ListItem Text="D" Value="4">
</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblans" runat="server"></asp:Label>
<asp:Label ID="TextBox1" CssClass="anslblformat" Width="200" BorderColor="White"
BorderStyle="None" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
please help me