A typical ASP page looks very similar to an HTML page. Sometimes you might have to strain your eyes to even find the code in it. Within a page you often find a block of ASP code tucked away between HTML. The ASP portion starts with <%
and ends with %>
, and you should be able to see that it looks more like commands:
The above script is a bit tough to understand at this point, of course, so don't get discouraged. As you can see, the first five lines are simple HTML, and the sixth line starts with the <h3>
HTML tag, which sets the browser to display the text that follows it as a header. Then, the ASP script kicks in, and runs GetString
with some parameters. This is what we refer to as a "function". You cannot see the function, which is located somewhere else, but what it does is open a language file with the various text messages UAG can show, and selects message no. 85, which reads, as you can guess, The site cannot be accessed. The advantage of using the GetString
function is that the server can decide what language to return to the user, without touching the code or HTML pages. So the same GetString
function, when the end-user decides to use the French language, will return: Impossible d'accéder au site, while for German it will return: Auf die Site kann nicht zugegriffen werden. As you can see, this function is used several more times in this script file and other parts of the UAG code, intermixed with the various HTML commands.