循环列表 <%foreach (DataRow dr in dtList.Rows) { %> <%=dr["username"] %> 匿名 <%=dr["addtime"] %> <%=dr["content"]%> <%if(dr["reply"].ToString()!=""){ %> 答:<%=dr["reply"].ToString() %> <%} %> <%} %> 循环列表获取ItemIndex <%int dtListItemIndex = 0; %> <%foreach (DataRow dr in dtList.Rows) { %> <%=dr["title"]%> (<%=dtListItemIndex%>) <%dtListItemIndex++; %> <%} %>