<%
Function duzelt(ByVal strEntry)
strEntry = Replace(strEntry, "<", "")
strEntry = Replace(strEntry, ">", "")
strEntry = Replace(strEntry, " ", "-")
strEntry = Replace(strEntry, "", "_")
strEntry = Replace(strEntry, "/", "")
strEntry = lcase(Replace(strEntry, "s", "s", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "ç", "c", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "i", "i", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "I", "i", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "ö", "o", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "g", "g", 1, -1, 1))
strEntry = lcase(Replace(strEntry, "ü", "u", 1, -1, 1))
strEntry = Replace(strEntry, ":", "")
strEntry = Replace(strEntry, """", "")
strEntry = Replace(strEntry, "!", "")
strEntry = Replace(strEntry, "?", "")
strEntry = Replace(strEntry, "'", "")
strEntry = Replace(strEntry, "`", "")
strEntry = Replace(strEntry, ".", "")
strEntry = Replace(strEntry, "(", "")
strEntry = Replace(strEntry, ")", "")
strEntry = Replace(strEntry, "[", "")
strEntry = Replace(strEntry, "]", "")
strEntry = Replace(strEntry, "&", "")
strEntry = Replace(strEntry, "'", "")
strEntry = Replace(strEntry, "$", "s")
duzelt = strEntry
End Function
%>
yukardaki kodlari yakindan inceleyelim,
strEntry = Replace(strEntry, "<", "")
burada "<" karakteri "" olarak degistiriliyor, yani siliniyor.
strEntry = Replace(strEntry, "deneme", "aspforever")
eger yukardaki gibi olsaydi deneme yazan yerlerde aspforever yazardi.
Ben de Yorum Yapmak İstiyorum
k demiş ki,
18.03.2010 17:29:02
nasıl kullancaz bunu yaniresponse.write asdsdsd>>><<<<qweqwe yazısında >< karakterlerini yazmaması için
kubilay demiş ki,
25.03.2010 08:32:04
@k şu şekilde kullanıyoruz.<%
degisken= deneme yanılma
response.write duzelt(degisken)
%>
veya
<%=duzelt(degisken)%>