How to use ASP & ASP/VBScript ReDim This the tutorial/example a scripts how to use ASP & ReDim declare array variable.
ShotDev Focus:
- ASP & ReDim declare array variable .
Option Explicit (When Option Explicit appears in a file, you must explicitly declare all variables using the ReDim)
Example
asp_redim.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim i Dim n,m n = 3 m = 4 ReDim arrVar(n+m) For i = 0 To n+m arrVar(i) = i + 10 Next '*** Write Array *** For i = 0 To UBound(arrVar) Response.write(arrVar(i)&"<br>") Next %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_redim.asp
Screenshot
.
.
.