Beberapa tips ASP dan solusi praktis
Nomor acak:
<%acak%>
<%= (int (rnd ()*n) +1)%>
Kata kunci catatan yang diperoleh saat permintaan data ditampilkan dalam warna merah:
<%= ganti (rs ("field x"), searchName, "<fontcolor =#ff0000>" & searchname & "</font>")%>
Melalui asp berarti, periksa apakah klien telah menggunakan agen.
<%ifrequest.serverVariable ("http_x_forwarded_for") <> "" Lalu
response.write "<fontColor =#ff0000> Anda telah melewati server proxy," & _
"IP asli adalah" & request.serverVariables ("http_x_forwarded_for")
endif
%>
Tentukan sumber halaman sebelumnya
request.servervariables ("http_referer")
JavaScript: Document.referrer
Hapus Cache, Reload Page
<%Response.Expires = 0
Response.ExpiresAbsolute = Now ()-1
response.addheader "pragma", "no-cache"
response.addheader "cache-control", "pribadi"
Response.cachecontrol = "no-cache"
%>
Tunjukkan tahun dan bulan di menu drop-down
<SelectName = "Select">
<%
DIMM_YEAR
DIMM_MONTH
DIMM_MONTHJ
DIMM_THONTH
DIMM_YM
Form_year = 2000Toyear (tanggal)
M_month = 12
Ifm_year = tahun (tanggal) lalu
M_month = bulan (tanggal)
Endif
Form_monthj = 1tom_month
Ifm_monthj <10then
M_themonth = "0" & m_monthj
Kalau tidak
M_themonth = m_monthj
Endif
M_ym = m_year & "-" & m_themonth%>
<optionValue = "<%= m_ym%>"> <%= m_ym%> </pection>
<%
Berikutnya
%Berikutnya>
</pilih>
Ambil dan hapus catatan duplikat di database
Conn.execute ("Deletefromtable whereIdnotin (SelectDistinctFromtable)")