here is my problem:
I have a relay on my asp.net (VB):
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Question_Number") %>' />
<%#Eval("Question_Desc")%>
Now, what I want to do is check the value that I did not use, called "Question_Type", which can be = 1, 2 or 3 depending on whether it is multiple choice, short answer, etc.
I tried this:
<%
if Eval("Question_type") = 1 then
Response.Write(" <asp:RadioButton runat=""server"">test1</asp:RadioButton>")
Response.Write(" <asp:RadioButton runat=""server"">test2</asp:RadioButton>")
Response.Write(" <asp:RadioButton runat=""server"">test3</asp:RadioButton>")
end if
%>
and I get this error:
Data binding methods such as Eval (), XPath (), and Bind () can only be used in the context of database management.
HOW can I use this value in an if statement?
source
share