Arkadaşlar bir emlak scripti sistemim var kontrol panelinde tüm ilanları görüntülerken ilan koduna göre karışık olarak gösteriyor. Resimdeki gibi



Benim İstediğim bu ilan kodlarının büyükten küçüğe doğru sıralanması

Kodlar :

<%Response.Buffer = True
Response.Expires = 0%>
<!--#include file="dbconn.inc"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<script src="java.js"></script>
<link href="font.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="2" onLoad="fixDataList()">
<%Set fileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Rs = Server.CreateObject("Adodb.RecordSet")
Set rsData = Server.CreateObject("Adodb.RecordSet")
if Request("pg") <> empty and isNumeric(Request("pg")) and Request("pg") > "1" then pg = Int(Request("pg")) else pg = 1

Rs.CacheSize = 1
Rs.PageSize = 250
rs.open "Select * from emIlanlarListe Where CPUserID="& Session("CPUserID") &"", conn, 1, 3
if not rs.eof then Rs.AbsolutePage = pg%>
<table width="791" height="100%" border="0" align="center" cellpadding="2" cellspacing="2" class="SilverTableBox">
  <tr>
    <td height="20" bgcolor="#336699"><table width="100%" border="0" cellpadding="2" cellspacing="2" bgcolor="#336699">
        <tr>
          <td><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif"><strong>İlanlar</strong></font></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="5"><table width="100%" height="100%" border="0" align="center" cellpadding="2" cellspacing="2">
        <tr>
          <td height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftTop.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightTop.gif" width="2" height="2"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
              <td width="771"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="HoverButton" onMouseOver="ButtonOnOver(this);" onMouseOut="ButtonOnOut(this);" onMouseDown="ButtonOnDown(this);" onClick="window.location='emIlanlar-yeni.asp'"><img src="../img/system/buttons/newitem.gif" width="22" height="21"><br>
                      Yeni</td>
                    <td class="HoverButton" onMouseOver="ButtonOnOver(this);" onMouseOut="ButtonOnOut(this);" onMouseDown="ButtonOnDown(this);" onClick="SubmitSelected(document.forms['DataList'],'Product Category(es)','emIlanlar-sil.asp','Do you want to sil selected Product Category(es)?');"><img src="../img/system/buttons/delete.gif" width="22" height="21"><br>
                      Sil</td>
                    <td class="HoverButton" onMouseOver="ButtonOnOver(this);" onMouseOut="ButtonOnOut(this);" onMouseDown="ButtonOnDown(this);" onClick="SubmitSelected(document.forms['DataList'],'Market(s)','emIlanlar-aktivasyon.asp?S=1','Do you want to aktivasyon selected Market(s)?');" value="aktivasyon"><img src="../img/system/buttons/active.gif" width="22" height="21"><br>
                      Aktif</td>
                    <td class="HoverButton" onMouseOver="ButtonOnOver(this);" onMouseOut="ButtonOnOut(this);" onMouseDown="ButtonOnDown(this);" onClick="SubmitSelected(document.forms['DataList'],'Market(s)','emIlanlar-aktivasyon.asp?S=0','Do you want to deaktivasyon selected Market(s)?');" value="Deaktivasyon" ><img src="../img/system/buttons/deative.gif" width="22" height="21"><br>
                      Pasif</td>
                    <td width="100%">&nbsp;</td>
                  </tr>
              </table></td>
              <td width="1"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftBottom.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightBottom.gif" width="2" height="2"></td>
            </tr>
          </table></td>
          <td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftTop.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightTop.gif" width="2" height="2"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
              <td width="771" align="center"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <form class="FormStyle" method="post">
                    <tr>
                      <td height="12" nowrap class="TextMediumNormal">
                        <select name="select" class="ComboBox">
                          <option value="1">Aktifler</option>
                          <option value="0">Pasifler</option>
                          <option value="all">Tümü</option>
                        </select>                        </td>
                    </tr>
                    <tr>
                      <td height="13" nowrap class="TextMediumNormal"><select name="select2" class="ComboBox">
                        <option value="0">Tümü</option>
                        <%rsData.open "select * from emEmlakDurumlari", conn, 1, 3
                      do while not rsData.eof%>
                        <option value="<%=rsData("DurumKodu")%>"><%=rsData("DurumIsmi")%></option>
                        <%rsData.movenext
                      loop
                      rsData.close%>
                      </select>
                        <select class="comboBox" name="tk" id="tk">
                        <option value="0">-- Tümü --</option>
                        <%rsData.open "Select * from emEmlakTipleri where Aktif=1", conn, 1,3
                          do while not rsData.eof%>
                        <option value="<%=rsData("TipKodu")%>" <%if int(request("tk")) = rsData("TipKodu") then response.write("selected")%>><%=rsData("TipIsmi")%></option>
                        <%rsData.movenext
      loop
      rsData.close%>
                      </select></td>
                    </tr>
                  </form>
              </table></td>
              <td width="1"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftBottom.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightBottom.gif" width="2" height="2"></td>
            </tr>
          </table></td>
          <td width="150"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftTop.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightTop.gif" width="2" height="2"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
              <td width="771" align="center"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <form class="FormStyle" method="post">
                  <tr align="right">
                    <td height="12" align="center" nowrap class="TextMediumNormal"><input name="Button3" type="button" class="sbttn" onClick="pg.selectedIndex--;submit();" value="&lt;&lt;" <%if pg = 1 then response.write("disabled") %>>
                        <select name="pg" class="ComboBox" id="select9" onChange="submit()">
                          <%for i = 1 to Rs.PageCount%>
                          <option value="<%=i%>"<%if pg = i then response.write("selected")%>><%=i%></option>
                          <%next%>
                        </select>
                        <input name="Submit22" type="button" class="sbttn" onClick="pg.selectedIndex++;submit();" value="&gt;&gt;" <%if pg = rs.pagecount then response.write("disabled") %>>
                      &nbsp;</td>
                  </tr>
                  <tr align="right">
                    <td height="13" align="center" nowrap class="TextMediumNormal"><%= ((pg * Rs.PageSize) - Rs.PageSize)%> to <%=pg * Rs.PageSize%> of <%=Rs.RecordCount%></td>
                  </tr>
                </form>
              </table></td>
              <td width="1"><img src="../img/system/ShadowRight.gif" width="2" height="42"></td>
            </tr>
            <tr>
              <td width="1" align="right"><img src="../img/system/ShadowLeftBottom.gif" width="2" height="2"></td>
              <td><img src="../img/system/ShadowTop.gif" width="100%" height="2"></td>
              <td width="1"><img src="../img/system/ShadowRightBottom.gif" width="2" height="2"></td>
            </tr>
          </table>          </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td valign="top"><table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0" class="TableInSideBox">
        <tr>
          <td height="20"><table cellpadding="0" cellspacing="0" id="DataHeader">
              <tr>
                <td width="22" height="22" align="center" class="LabelBox"><input name="CheckAll" type="checkbox" id="CheckAll" onClick="SelectAllBox(document.forms['DataList']);"></td>
                <td height="22" align="left" nowrap class="LabelBox">Kod</td>
                <td align="left" nowrap class="LabelBox">Durum / Tip </td>
                <td align="center" nowrap class="LabelBox">Ölçü</td>
                <td align="center" nowrap class="LabelBox">Oda</td>
                <td align="center" nowrap class="LabelBox">Şehir / İlan / Semt </td>
                <td align="center" nowrap class="LabelBox">Fiyatı</td>
                <td align="center" nowrap class="LabelBox">Resim</td>
                <td align="center" nowrap class="LabelBox">Aktif</td>
                <td width="100%" align="center" nowrap class="LabelBox">&nbsp;</td>
              </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td><span class="ListBoxDiv">
            <form class="FormStyle"  name="DataList" id="DataList" method="post">
              <table width="100%" border="0" cellpadding="0" cellspacing="0" id="DataGrid">
                <%RowIndex = 1
        do while not rs.eof and Not RowIndex > Rs.PageSize%>
                <tr class="TextSmallNormal" onMouseOver="bgColor='#CAD2E8';" onMouseOut="bgColor='';">
                  <td width="22" align="center"><input name="LID" type="checkbox" id="LID" value="<%=Rs("IlanKodu")%>"></td>
                  <td><a class="TextSmallNormal" href="emIlanlar-duzenle.asp?LID=<%=rs("IlanKodu")%>&rp=<%=pg%>"><%=rs("IlanKodu")%></a></td>
                  <td><a class="TextSmallNormal" href="emIlanlar-duzenle.asp?LID=<%=rs("IlanKodu")%>&rp=<%=pg%>"><%=rs("DurumIsmi") & " / " & rs("TipIsmi")%></a></td>
                  <td><%=rs("Olcu")%> m²</td>
                  <td><%=rs("OdaTipIsmi")%></td>
                  <td><%=rs("SehirIsmi") & "/" & rs("IlceIsmi") & "/" & rs("SemtIsmi")%></td>
                  <td align="right"><%=FormatNumber(rs("Fiyat"),0) & " " & rs("ParaBirimi")%></td>
                  <td align="right"><a href="emIlanlar-pictureUpload.asp?ID=<%=rs("IlanKodu")%>">Yukle</a></td>
                  <td width="35" align="center"><%if rs("Aktif") = 1 then%>
                    <img src="../img/system/active.gif" width="9" height="10" border="0">
                    <%else%>
                    <img src="../img/system/Inactive.gif" width="9" height="10" border="0">
                  <%End If%></td>
                </tr>
                <%rs.movenext
          RowIndex = RowIndex + 1
          loop%>
                <%if rs.recordcount = 0 then%>
                <tr align="center">
                  <td height="20" colspan="9" class="txtMN">Kayıt yok </td>
                </tr>
                <%end if%>
              </table>
            </form>
          </span></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
Hayırsever bir vatandaş yaparsa yada nasıl olacağını söylerse çok makbule geçer.