Dim / assignment
Try it yourself →Declares a variable.
Syntax
Dim name name = value
Description
VBScript does not specify types (all are Variant). Declared with Dim, assigned with =. String concatenation uses &.
Example
<% Dim name name = "HexLibrary" Response.Write "Hello " & name %>
Expected output
Hello HexLibrary
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ String concatenation uses & instead of + (in VBScript).