diff --git a/demos/asp b/demos/asp new file mode 100644 index 00000000..1eb717bf --- /dev/null +++ b/demos/asp @@ -0,0 +1,93 @@ + + +
+
+<!--#include file="test.asp"-->
+<!--#include virtual="/test2.asp"-->
+
+<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
+<%
+
+function changeTextFunc(a, b, c, mystring)
+ d = b + c
+ if cint(a) = cint(d) then
+ mystring=replace(mystring,"ASP","Classic ASP")
+ end if
+ changeTextFunc = mystring
+end function
+
+dim mystring = ""
+dim position = 0
+mystring_empty = true
+mystring = "Support ASP for use in Rainbow.js"
+
+if len(trim(mystring)) = 0 then mystring_empty = false
+
+mystring = changeTextFunc(5, 2, 3, mystring)
+
+position = instr(mystring,"ASP")
+
+select case cint(position)
+ case 0
+ 'operations
+ response.Write "The word searched is not in the string"
+ case else
+ 'other operations
+ response.Write "Great! The word searched is in the string"
+end select
+
+dim string_names = ""
+sql="select id, name from my_table;" 'query example
+set rs=connection.execute(sql)
+if not rs.eof then
+ Do while not rs.eof
+ string_names = string_names & rs("name") & ","
+ rs.movenext
+ Loop
+ string_names = left(string_names,len(string_names)-1)
+end if
+rs.close
+set rs = nothing
+%>
+
+
+
+<%
+strTest = ""
+For i = 1 To Request.Form.Count
+ strTest = strTest & Request.Form.Key(i) & ": " & Request.Form.Item(i) & "
"
+Next
+
+'other examples
+session.Timeout = 30
+session.Abandon
+response.Write request.Form
+response.redirect "http://www.michelepisani.it"
+
+'...and more (cicle for, do while, on error resume next, ...)
+%>
+
+
+
+
+
+
+