Some application of XML in ASP

Source: Internet
Author: User
Translation is very lame, hope everyone understanding, hehe.
Scriptlets-A better way to organize your ASP code
Scripts and components written with Extensible Flag Language (XML) and. Xml are used to define objects, methods, properties, and so on.
The script also provides a function. Scripting languages can be JavaScript, VBScript, and so on. The application of the website and the application of the program
Ordinary examples can now be converted into scriptlets. Just use scriptlets to write the component,
They can be reused on the site or use the various parts of the program, can be used in the service side (such as ASP code)
can also be used on clients (such as browsers)
Here we will focus on the server-side scriptlets for component ASP code.
Earlier, ASP developers were accustomed to writing include files. Used to do public service-side routines,
Also used in their website application program. Functionally, include files are limited to simply referencing them in the page.
Completes the function of passing parameters.
The same common routines are now able to add scriptlet methods and help with the use of components in the application program.
This method is now widely used in the Web site application program, can be run on the same server application reuse.
This approach makes it very easy to get (Pull-down) data out of the database.
Example: Establish scriptlet methods and attributes that make it very popular to get data from a database.
And make all the applications running on the same server use the same scriptlet without having to write code again.
The code is as follows:
Scriptlet file name is SCP_QUERY2LIST.SCT
? XML version= "1.0"?>
<scriptlet>
<registration
description= "Scp_query2list"
Progid= "Scpquery2list. Scriptlet "
version= "1.00"
Classid= "{e32d2a70-4e11-11d3-a9f0-0080c8034244}"
>
</registration>
<public>
<method name= "Query2list" >
<parameter name= "objconn"/>
<parameter name= "Query"/>
</method>
</public>
<implements type= "ASP" id= "ASP"/>
<script language= "VBScript" >
<! [CDATA] [
Sub query2list (objconn, query) Dim objRS
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.