Hola tengo el siguiente codigo
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="adovbs.inc"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<SCRIPT LANGUAGE=javascript>
function ordenar(campo){
document.form1.target = "mainFrame";
document.form1.oculto.value = campo;
document.form1.submit();
}
</SCRIPT>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #fffff0;
}
.style1 {
color: #FFFFCC;
font-weight: bold;
}
.style2 {font-family: "Arial Narrow"}
.style8 {color: #FFFFCC}
.style9 {font-family: "Arial Narrow"; color: #FFFFCC;}
.style13 {color: #006699}
.style14 {font-family: "Arial Narrow"; font-size: 12px; color: #006699; }
.style15 {font-size: 12px}
.style16 {color: #006699; font-size: 12px; }
-->
</style></head>
<body>
<p><span class="style2">
<%
DIM strSQL
set con = server.CreateObject("ADODB.Connection")
con.open(session("ConnectionString"))
strSQL = "SELECT * FROM QI_Lista_Archivos where id_lista=4"
set RS = con.execute (strSQL)
%>
<br>
</span></p>
<table width="890" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#006699">
<tr bordercolor="#FFFFF0" bgcolor="#006699">
<td colspan="9" valign="top"><p align="center" class="style1 style2">SOP´s Planta Vallejo </p></td>
</tr>
<tr valign="top" bordercolor="#FFFFF0" bgcolor="#006699">
<td width="109" style='cursor:hand' onclick=ordenar('KE')"&chr(10)&" ><% "&SortKE&" %></tr><p align="center" class="style9"><strong>KE</strong></p></td> <td width="65"><p align="center" class="style9"><strong>N° SOP</strong></p></td>
<td width="84" bgcolor="#006699"><p align="center" class="style9"><strong>Título</strong></p></td>
<td width="78"><p align="center" class="style9"><strong>Originador </strong></p></td>
<td width="70"><p align="center" class="style9"><strong>Archivo</strong></p></td>
<td width="134"><p align="center" class="style9"><strong>Tipo</strong></p></td>
<td width="80"><div align="center" class="style8"><strong><span class="style2">Fecha de Elaboración</span></strong></div></td>
<td width="90"><div align="center" class="style8"><strong>Próxima revisión</strong></div></td>
<td width="92"><div align="center" class="style8"><strong>Status</strong></div></td>
</tr>
<% Do While not rs.eof %>
<tr valign="top">
<td width="109"><p align="center" class="style2 style4 style13 style15"><%
response.Write(rs(10))
%>
</p></td>
<td width="65"><p align="center" class="style5 style6 style13 style15"><span class="style4 style2">
<%
response.Write(rs(12))
%>
</span>
</p></td>
<td width="84"><p align="center" class="style14"><span class="style5 style6"><span class="style4 style2">
<%
response.write(rs(2))
%>
</span></span>
</p></td>
<td width="78"><p align="center" class="style14"><span class="style5 style6">
<% response.write(rs(3)) %>
</span>
</p></td>
<td width="70"><p align="center" class="style14">
<a href="<% response.write("Admin/Archivos/" & rs(4)) %>">
<%
if rs(4) = "" then
response.write("<font color= red>"&"No Existe Archivo")
else
response.write(rs(4))
end if
%></a>
</p></td>
<td><p align="center" class="style14">
<%
if rs(5) = "pdf" then
response.write("<img width='23' height='19' src='imagenes/adobe.gif'>")
else
if rs(5) = "doc" then
response.write("<img width='23' height='19' src='imagenes/word.gif'>")
else
if rs(5) = "xls" then
response.write("<img width='23' height='19' src='imagenes/excel.jpg'>")
else
response.write("<img width='23' height='19' src='imagenes/otro.gif'>")
end if
end if
end if
%>
</p></td>
<td><div align="center" class="style16"><span class="style2">
<%
if rs(7) = "" then
response.write("<font color= red>"&"N/A")
else
response.write(rs(7))
end if
%>
</span></div></td>
<td><div align="center" class="style16"><span class="style2">
<%
if rs(8) = "" then
response.write("<font color= red>"&"N/A")
else
response.write(rs(8))
end if
%>
</span></div></td>
<td><div align="center" class="style16"><span class="style2">
<%
if rs(8) = Date() then
response.write("<img width='23' height='19' src='imagenes/rojo.jpg'>")
else
if rs(8)<Date()+30 then
response.write("<img width='23' height='19' src='imagenes/amarillo.jpg'>")
else
if rs(8)>Date()+30 then
response.write("<img width='23' height='19' src='imagenes/verde.jpg'>")
end if
end if
end if
%>
</span></div></td>
<%
rs.MoveNext
Loop
%>
</tr>
</table>
<span class="style2"> </span>
<%
rs.Close
con.Close
Set con = Nothing
Set rs = Nothing
%>
<p align="center"> </p>
<p align="center">
<input name="Input" type="button" value="Regresar" style="font-size:12px; color:#006699; width:120px;" onClick="javascript:history.back();">
</p>
</body>
</html>
Que no hace mas que tomar datos de una tabla y ponerlos en una tabla dentro de una pagina, como hago para que al pulsar el titulo KE este me los acomode por orden numerico, o en titulo alfabetico
Espero pueden ayudarme y yo tambien pienso ayudar n lo que pudea