camdaman
04-11-2005, 09:16 PM
I am using a database to get my data and I use <%#Container.DataItem("FIELD")%> to get any of my data from the Repeater contriol
What I am trying to do is get the value and either pass is a a variable (cant or not sure how to store as a variable) or just compare to a certain string
Basically I have Multiple Choice trivia and regular trivia and I would have a QuestionType field and would like to compare
if <%#Container.DataItem("Type")%> = "M"
<table border="0" cellspacing="2" cellpadding="2">
<td>A - <%# Container.DataItem("A")%></td></tr>
<tr><td>B - <%# Container.DataItem("B")%></td></tr>
<tr><td>C - <%# Container.DataItem("C")%></td></tr>
<tr><td>D -<%# Container.DataItem("D")%></td></tr>
</table>
<%end if%>
but the if statement wont execute so how do you get the value from the database using variables or another method
Thanks in advanced
What I am trying to do is get the value and either pass is a a variable (cant or not sure how to store as a variable) or just compare to a certain string
Basically I have Multiple Choice trivia and regular trivia and I would have a QuestionType field and would like to compare
if <%#Container.DataItem("Type")%> = "M"
<table border="0" cellspacing="2" cellpadding="2">
<td>A - <%# Container.DataItem("A")%></td></tr>
<tr><td>B - <%# Container.DataItem("B")%></td></tr>
<tr><td>C - <%# Container.DataItem("C")%></td></tr>
<tr><td>D -<%# Container.DataItem("D")%></td></tr>
</table>
<%end if%>
but the if statement wont execute so how do you get the value from the database using variables or another method
Thanks in advanced