当前位置: 代码迷 >> 网页设计 >> asp排序形式解决不了
  详细解决方案

asp排序形式解决不了

热度:412   发布时间:2013-02-26 00:00:00.0
asp排序方式解决不了
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
dim rst
Set Rst=Conn.Execute("Select * From Class Where Layout='Faq' and ParentID="& Rs("ClassID") &" order by RootID,OrderID")
i=1
Do While Not Rst.Eof
%>
<tr>
                    
                      <td class="left_c2">&nbsp;&nbsp;<img src="Images/icon_02.gif" width="9" height="9" />&nbsp;
  <a href="faq-line.asp?classid=<%=rst("ClassID")%>" target="_parent"><%=Rst("ClassName")%></a>
  </td>
                    </tr>
                    <tr>
                      <td height="1" background="Images/dot_01.gif"><img src="Images/space.gif" width="1" height="1" /></td>
               </tr>     
                    <%
Rst.MoveNext
Loop
Rst.Close
Set Rst=Nothing
%>
                </table>

------解决方案--------------------------------------------------------
<table>
        <% 
dim rst 
Set Rst=Conn.Execute("Select * From Class Where Layout='Faq' and ParentID="& Rs("ClassID") &" order by RootID,OrderID") 
i=1 
Do While Not Rst.Eof 
%><tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">

      <tr>
        <td class="left_c2">&nbsp;&nbsp; <img src="Images/icon_02.gif" width="9" height="9" />&nbsp; <a href="faq-line.asp?classid= <%=rst("ClassID")%>" target="_parent"> <%=Rst("ClassName")%> </a> </td>
      </tr>
      <tr>
        <td background="Images/dot_01.gif"><img src="Images/space.gif" width="1" height="1" /> </td>
      </tr>

    </table></td>
  </tr>      <% 
Rst.MoveNext 
Loop 
Rst.Close 
Set Rst=Nothing 
%>
</table>