日期:2014-05-17 浏览次数:20436 次
<div> <asp:Repeater ID="RepeaterResultShow" runat="server" onitemdatabound="RepeaterResultShow_ItemDataBound"> <ItemTemplate> <hr class="hr98 " /> </li> <%# Container .ItemIndex +1 %> 题型: [<%#Eval("questiontype")%>]<br /> 题本:<%#Eval("question")%><br /> <asp:Label ID="lblA" runat="server" Text="">A:<%#Eval("qA")%></asp:Label> <asp:Label ID="lblB" runat="server" Text="">B:<%#Eval("qB")%><br /></asp:Label> <asp:Label ID="lblC" runat="server" Text="">C:<%#Eval("qC")%><br /></asp:Label> <asp:Label ID="lblD" runat="server" Text="">D:<%#Eval("qD")%><br /></asp:Label> 正确答案:<%#Eval("qanswer")%> <br /> 您的回答:<%#Eval("useranswer")%> <br /> </ItemTemplate> </asp:Repeater> </div>
------解决方案--------------------
前台:
<asp:Repeater ID="RepeaterResultShow" runat="server"> <ItemTemplate> <hr class ="hr98 " /></li> <%# Container .ItemIndex +1 %> 题型: [<%#Eval("questiontype")%>]<br /> 题本:<%#Eval("question")%><br /> <%=GetHtml(Eval("type").ToString(),Eval("qA").ToString(),Eval("qB").ToString(),Eval("qC").ToString(),Eval("qD").ToString())%> 正确答案:<%#Eval("qanswer")%> <br /> 您的回答:<%#Eval("useranswer")%> <br /> </ItemTemplate> </asp:Repeater>