Un esempio usando la funzione realizzata da Weppos:
codice:
<%
function GetFileExtension(fileName)
if InStr(fileName, ".") > 0 then
GetFileExtension = "." & Right(fileName, Len(fileName) - InStrRev(fileName, "."))
else
GetFileExtension = ".tmp"
end if
end function
%>
<%
strFile = "prova.gif"
strEstensione = GetFileExtension(strFile)
%>
<%
If strEstensione=".html" or strEstensione=".htm" then
Response.write "<img src=img.jpg width=224 height=69>"
End if
%>
<%
If strEstensione=".jpg" or strEstensione=".gif" or strEstensione=".png" then
Response.write "<img src=img2.jpg width=224 height=69>"
End if
%>
Chiaramente è solo un esempio fatto di corsa che puoi sviluppare come meglio credi.