page repeater
1 <asp:Repeater ID="r_scoreCount" runat="server"> 2 <HeaderTemplate> 3 <table width="90%" border="0" cellpadding="3" cellspacing="1" align="center" style="background-color: #CCC;"> 4 <tr style="text-align: center; color: #FFF; background-color: #336699;"> 5 <th width="6%" align="center"> 6 编号 7 </th> 8 <th width="20%" align="center"> 9 试卷编码 10 </th> 11 <th width="14%" align="center"> 12 总分 13 </th> 14 <th width="10%" align="center"> 15 考试时间 16 </th> 17 <th width="10%" align="center"> 18 试卷状态 19 </th> 20 21 <th width="10%" align="center"> 22 考试 23 </th> 24 </tr> 25 </HeaderTemplate> 26 <ItemTemplate> 27 <tr style="text-align: center; color: #0076C8; background-color: #F4FAFF;"> 28 <td width="6%" align="center"> 29 <%#Eval("Id")%> 30 </td> 31 <td width="20%" align="center"> 32 <%#Eval("PaperName")%> 33 </td> 34 <td width="14%" align="center"> 35 <%#Eval("TotalScore")%> 36 </td> 37 <td width="10%" align="center"> 38 <%#Eval("ExamTime")%> 39 </td> 40 <td width="10%" align="center"> 41 <%#this.info(Eval("PaperSta").ToString())%> 42 </td> 43 44 <td width="10%" align="center"> 45 <a href='Exam.aspx?qid=<%#Eval("Id")%>&page=userPaperList&pno=<%#this.listpage.CurrentPageIndex%>'>开始答卷</a> 46 </td> 47 </tr> 48 </ItemTemplate> 49 <FooterTemplate> 50 </table> 51 </FooterTemplate> 52 </asp:Repeater>
返回
1 protected string info(string sign) 2 { 3 string returnStr = ""; 4 switch (sign) 5 { 6 case "0": 7 returnStr = "锁定"; 8 break; 9 case "1": 10 returnStr = "有效"; 11 break; 12 case "2": 13 returnStr = "待阅"; 14 break; 15 case "3": 16 returnStr = "完成"; 17 break; 18 19 } 20 return returnStr; 21 }