InternetUnicodeHTMLCSSScalable Vector Graphics (SVG)Extensible Markup Language (xml)ASP.NetDocument Object Model (DOM)JavaScript Draft for Information Only
Content
Scripting
ScriptingASP is only a server side scripting technology along with some fundamental interface elements from Microsoft.com for running script on the server side to create HTML content dynamically. In other words, ASP is only a scripting host for the supported scripting language to provide the interactivity required for a dynamic web application solution on the server side. Script is a small program or a series of instructions written for a command interpreter to interact with the scripting host. A scripting language is needed to use as the programming language for web application development. The scripting language allows the web site builder to customization their web site by making use of the conditional and looping statements, and the built-in functions. The ASP engine of Internet Information Server provides native support for both Microsoft VBScript and JScript. Both VBScript and JScript can be used as the scripting language for ASP. Besides VBScript and JScript, other third-party ActiveX compliant Scripting engines can also be used. The key feature of these ActiveX Scripting engines is the capability of calling ActiveX objects and the built-in ASP objects. The default scripting language is VBScript. ASP Server-Side ScriptingFor the client-side scripting, all script can be placed within the HTML document by the <script> element. That is all script is enclosed by <script></script> tags of the <script> element. The included scripting code in the HTML document will sent to the browser together with the HTML contents. But for the ASP server-side scripting, the file extension of the HTML document should be ended with ".asp" and all ASP command must be delimited with <%...%> otherwise the ASP code or scripts will not be interpreted by the ASP engine. Since the code delimited with <%...%> will be interpred before sending to the browser, the server-side script which compatible with the client-side scripting language can also be placed inside the client-side script. Besides the <script> element with "runat" attribute equal to "server" can also be interpreted as a server-side only function which can be work with the ASP script at the server-side. However, since the server-side <script> element is already running in the server-side scripting environment, the using of delimiters <%...%> in the server-side <script> element will become a syntax error. Therefore the delimiter "<%" is to pass the control of code interpretation to the ASP engine of the current default scripting and the delimiter "%>" is to return the control of code interpretation to the web server. ExamplesExamples of ASP code
ASP.NET Code Input:
HTTP Response Output:
HTML Web Page Embedded Output: Scripting LanguageThe default scripting language of the ASP script programming is VBScript. The default scripting language of ASP engine can also be specified by the preprocessor ASP directive, @LANGUAGE. Since the default scripting language is changed, the ASP engine should return the control of code interpretation to the web server before the new default scripting language becomes activated, i.e. end the preprocessor ASP directive by "%>" becore continue with other script. ExamplesExamples Of ASP code
ASP.NET Code Input:
HTTP Response Output:
HTML Web Page Embedded Output: In general, more than one scripting language can be used for the entire ASP application. For example, VBScript in server-side code and JavaScript on the client-side code. Besides server-side script other than the default scripting language can also be used with the HTML document using the <SCRIPT> element with the corresponding scripting language. Whenever there is preprocessor ASP directive, the ASP engine will process first. If the @LANGUAGE directive is present, the ASP engine will set the default scripting language accordingly. Then the ASP engine will first interpret all script in <SCRIPT> element with non-default scripting language before continue with the code after the preprocessor ASP directive. All script in <SCRIPT> element with default scripting language will be interpretted after processing the whole HTML document. Because of the unexpected sequence of processing the <SCRIPT> element due to the complexity of the script arranged by the ASP engine, the <SCRIPT> element is usually used for containing procedures and functions only. Besides, the client-side script will be interpreted on the client browser whenever necessary. ExamplesExamples of ASP code
ASP.NET Code Input:
HTTP Response Output:
HTML Web Page Embedded Output: SyntaxSince more than one scripting language can be used to build the ASP code, the syntax of ASP page is highly depending on the scripting language used in writing the web application. Aparted from the syntax of scripting language, there are also some basic rules for constructing correctly structured ASP pages.
©sideway ID: 121200003 Last Updated: 5/5/2019 Revision: 1 Latest Updated Links
|
Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Reference 79 Computer Hardware 249 Software Application 213 Digitization 32 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 429 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019