Se un carattere è presente nella stringa di input ma non in chars, allora è un carattere speciale.
Il controllo termina e la funzione restituisce true.

Quando la stringa restituisce true dovrebbe apparire a video carattere trovato invece non appare niente.

qualcuno mi può aiutare


Grazie



public function hasSpecialchars(input)


Dim chars
Dim char
Dim ii
input="kgllggh%"
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789"

for ii = 1 to Len(input)
char = Mid(input, ii, 1)
if(InStr(chars, char) = 0) then
hasSpecialchars = true
exit function
end if
next

hasSpecialchars = false

If hasSpecialchars= true Then
Response.write "Trovato"
Else
Response.write "Non Trovato"
End if

end function