Back to product page
- Introduction
- License agreement
- Getting Started
- Enumerations
- Objects
- How to get support?
- Technical information
- Fast notifications interface
- Error list
ScriptBegin property
Holds text that is interpreted as begin of scripting language.
Type
StringSyntax
- Basic
object.ScriptBegin [= value]
The ScriptBegin(object,value) syntax has these parts:
The ScriptBegin(object,value) syntax has these parts:
object | An expression evaluating to an object of type WebResponse |
value | A String value. |
Remarks
ScriptBegin expression defines how wodWebServer parses Response content searching for your "home made" scripts. You can set it (together with ScriptEnd) to something like this:User.Response.ScriptBegin = "<%"
User.Response.ScriptEnd = "%>"
When wodWebServer finds those values in the response, it will fire RunScript event so you can evaluate/execute contents of scripted data, and change response on the fly.
You can use this property to define templates from your HTML files. For example, you can have your HTML code like this:
Hi. You are coming from <b><%HOSTNAME%></b>. Current date is <b><%DATE%></b>
assuming you have set ScriptBegin to "<%" and ScriptEnd to "%>" then when RunScript is called you can do this:
If ScriptData = "HOSTNAME" Then ResponseData = User.RemoteIP
If ScriptData = "DATE" Then ResponseData = Now
this will cause wodWebServer to replace your templates with real values, and send them to the client.