|
A script block can appear anywhere on the Web page, and there can be as many
script blocks as the user needed. However, a single script block is normally the sufficient one,
and it commonly appears at the top of the Web page, prior to any HTML
code that appears on the page. The reason for the placing the script at the top of
the page is in recognition of the fact that the server runs the script first,
before it takes action on any other components of the Web page.
The attribute runat="server" indicates that the
enclosed script is to be run, or executed, by Web server computer
prior to transmitting the page to the client computer which made the URL request
for the page and the attribute also differentiates server scripts from
browser scripts that also are enclosed within <script>
tags.In the JavaScript language,these browser-based scripts are usually written.
Optionally, language="vb" or language="Visual Basic" can be included in the opening tag to indicate
the programming language used in the script and this attribute is optional since
Visual Basic is the default server language for Web page scripts.
|